对象不支持此属性或方法 我在jsp上用到了javascriptdocument.form1.submit();这句就在ie上出错了,我已经通过alert()这个判断出这句话出错了,错误信息如题,大虾们看看这个地方怎么就出了这个错误! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 L@_@K <body> <form id="form1"> </form> </body> <script type="text/javascript"> <!-- alert(document.form1); alert(document.all.form1); //--> </script> document.form1.submit();是这个出了问题,不知道你写的是什么意思? 补充:alert(document.form1); // 就这个不行!alert(document.all.form1);alert(document.all.form1.id);alert(document.forms(0));alert(document.forms(0).id);alert(document.getElementById("form1"));alert(document.getElementById("form1").id); To wuliao_hchu() LZ 的问题出在找错了对象! 我用 document.forms[0].submit();也是这个错误,我其他的页面也用到了,就这个不行,郁闷咧! 你用dom好了,不出现rpwt还有兼容性好 页面上有个对象的名字或函数名叫submit,重名冲突了,请认真检查 谢谢lion98(韩宾【往上走,向下看】) 问题知道了!但不知道怎么给分 js 通过 WORD.APPLICATION,获取关闭后事件,高分求教 关于层显示与隐藏问题 ExtJS中EditorGridPanel编辑时,单元格错位的问题,求教!!! 如何实现点击弹出层以外关闭弹出层? msn主页中的js为什么比我们的好? 谁有金额大小写的javascript的转换函数? 下拉菜单中能实现“Alt”效果吗? 挑战性的问题:三级SELECT选择 在IE11下使用 HTML5 API 的拖拽,尼玛当时我就震惊了! 兼容问题 javascript如何感知IE窗口的移动和大小的改变? apache 伪静态的生存调查
<form id="form1">
</form>
</body>
<script type="text/javascript">
<!--
alert(document.form1);
alert(document.all.form1);
//-->
</script>
alert(document.all.form1);
alert(document.all.form1.id);
alert(document.forms(0));
alert(document.forms(0).id);
alert(document.getElementById("form1"));
alert(document.getElementById("form1").id);