这是我的代码,用来修复ie,ff,getElementById等中的兼容性
function getId(item) {
if( window.mmIsOpera ) return(document.getElementById(item));
if (document.all) return(document.all[item]);
if (document.getElementById) return(document.getElementById(item));
return(false);
}我的问题是,在ie,ff,getElementsByName中的歌剧..
发布于 2010-11-30 14:48:22
我昨晚找到解决方案了。
要从文本字段中获取值,只需在表单中添加一个属性"name“即可。正如的David Dorward所说: document.nameOfForm.nameOfTextfield.value
发布于 2010-11-29 21:52:04
所有主流浏览器都支持getElementsByTagName:
http://www.quirksmode.org/dom/w3c_core.html
https://stackoverflow.com/questions/4304329
复制相似问题