日期:2014-05-16  浏览次数:20340 次

ie正常ff报错
在ie下正常,在ff报错
var     areaName
=document.loginform.areaName.options[loginform.areaName.selectedIndex].value;

loginform     <form       name=loginform   id=   loginform     action= " "   >



------解决方案--------------------
方法应该是没问题的,在FF下应该只是报个警告,不会报错的
如果不要警告就要使用document.getElementById( "areaName ").value
------解决方案--------------------
规范点的用法应该是

document.forms[ "loginform "].areaName.options[loginform.areaName.selectedIndex].value;
------解决方案--------------------
document.loginform.areaName.options[document.loginform.areaName.selectedIndex].value;