+ -
当前位置:首页 → 问答吧 → 在IE下正常运行,this.options.value 取值正常

在IE下正常运行,this.options.value 取值正常

时间:2011-11-11

来源:互联网

document.getElementById(tagName).options.value 在IE 下去值正常
document.getElementById(tagName).options.value 在firefox 下出现undefined
解决方法

作者: axiaodan   发布时间: 2011-11-11

var a=document.getElementById(tagName);
alert(a.options[a.selectedIndex].value);

作者: ifandui   发布时间: 2011-11-11

document.getElementById(selectId).value

作者: sharkdbj   发布时间: 2011-11-11

JScript code
document.getElementById(tagName).value

作者: axiheyhey   发布时间: 2011-11-11

相关阅读 更多