关于 HTML中Form的提交?不知道是不是IE的BUG?

xshine 2003-01-14 08:32:02
我编了一个网页如下:
<html><body>
<form method="post" action="http://xxxx" name="frm1">
<input type="text" name="text1">
</form>
</body>
</html>

然后,用IE,打开该HTML File,接着把Cursor定位到Edit输入框中,接着 回车。
令人奇怪的是:Form被自动提交了!!
怪,不知道是不是IE的BUG!

如果,一个页面中有两个以上Edit框,就不会有该问题!!!!

那位大虾指点一下!
...全文
10 点赞 收藏 5
写回复
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
tata_1980 2003-01-15
关注
回复
Go_Rush 2003-01-14
来自MSDN的解释:

When the focus is on a control in a form and the user presses ESC, the value of the control reverts to the last value. The form resets if the user presses ESC again. If the focus is on the form but not on a particular control and the user presses ESC once, the form resets.

If the form includes only one text box and the user presses ENTER, the onsubmit event fires. If the form has an INPUT type=submit element, it will appear as a button with a dark border, which indicates the user can press ENTER to submit the form.
回复
Go_Rush 2003-01-14
不是bug啊

只有一个<input type=text>的时候是默认提交的,并不需要<input type=submit>
回复
adu_neu 2003-01-14
perhaps default setup of it,for there's only one component in the page
and perhaps you are right,you can try it with Netscape too.
回复
chjpeng 2003-01-14
還沒碰到過,關注一下
回复
发动态
发帖子
CSS
创建于2007-09-28

5.9w+

社区成员

层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
申请成为版主
社区公告
暂无公告