【发布时间】:2011-07-18 16:46:26
【问题描述】:
我在页面中有以下片段。我一生都无法弄清楚为什么单击 button1 元素时表单没有提交。我在 IE 中收到一个错误,提示此对象不支持此属性或方法。我将 document.poform 放入警报中,它会提醒表单对象。我觉得我错过了一些非常明显的东西??
<pre>
<?
var_dump($_POST);
?>
</pre>
<form action="" method="post" name="poform">
<input name="test" type="text" />
<input name="button" type="button" value="button1" onclick="document.poform.submit();" />
<input name="submit" type="submit" value="button2" />
</form>
【问题讨论】:
-
@Gabe:无操作意味着“提交到加载表单的相同 url”。
-
@Gabe 定义没有任何操作只是提交给自己。
标签: javascript html