![](/img/trans.png)
[英]JavaScript runtime error: Unable to get property 'value' of undefined or null reference
[英]JavaScript runtime error: Unable to get property 'options' of undefined or null reference
$(lblName).innerText = $(ddlNameList).options[$(ddlNameList).selectedIndex].text;
是否知道为什么上面的代码行在chrome中可以运行,但在Internet Explorer 11中却失败,并出现以下错误
JavaScript运行时错误:无法获取未定义或空引用的属性“选项”
尝试这个:
$(lblName).innerText = $('#' + ddlNameList + ' option:selected').val();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.