js
<script>
var selectId = document.getElementById("VariantType");//獲取ID
selectId.onchange = function ()
{
var result = selectId.options[selectId.selectedIndex].innerHTML;//獲取選中文本
if (result == "Fusion") { //當變異類型的值為Fusion時,變異值為空
$("#Variant").val("");
}
}
</script>
jquery
$("#VariantType").change(function () {
var result = $(this).children('option:selected').val();
if (result == "Fusion") {
$("#Variant").val("")
}
});
