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("")
            } 
});

 

相关文章:

  • 2021-11-04
  • 2021-07-22
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
  • 2021-12-23
相关资源
相似解决方案