关于 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框,就不会有该问题!!!!

那位大虾指点一下!
...全文
55 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
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
  • 打赏
  • 举报
回复
還沒碰到過,關注一下

61,129

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧