我有 MVC 应用程序。
我在创建视图的 JS 中编写了以下代码。基本上在下拉选择的基础上,我显示和隐藏 div。现在问题出在下面的代码在 Google chrome 和 Mozilla Firefox 中完美运行。但现在在 IE 8 中工作。
我应该怎么办 ?
$('#PaymentType').change(function(){
var ptype=document.getElementById("PaymentType").value;
if(ptype=="On Account")
{
$(".InvoiceDiv").hide();
}
else
{
$(".InvoiceDiv").show();
}
});