buttons need type="submit" to submit in IE
2010-07-07 15:10
411 查看
In a typical round of doing Internet Explorer clean up at the end of a
project, I had to figure out why my
wasn't submitting a form in IE.
I did a search on "html button" and went to the w3c HTML
4.01 specifications
:
type = submit|button|reset [CI]
This attribute declares the type of the button. Possible values:
submit: Creates a submit button. This is the default value.
reset: Creates a reset button.
button: Creates a push button.
So the default is submit. But Internet Explorer has obviously
forgotten this in IE6 and IE7. I found it worked without type="submit"
in Firefox, Safari, Chrome and Opera. I haven't tested in IE8 because I
don't have it installed. Maybe someone wants to check it out? Here
is a demo page.
So I guess we should get in the habit of using:
project, I had to figure out why my
<button>Submit</button>
wasn't submitting a form in IE.
I did a search on "html button" and went to the w3c HTML
4.01 specifications
:
type = submit|button|reset [CI]
This attribute declares the type of the button. Possible values:
submit: Creates a submit button. This is the default value.
reset: Creates a reset button.
button: Creates a push button.
So the default is submit. But Internet Explorer has obviously
forgotten this in IE6 and IE7. I found it worked without type="submit"
in Firefox, Safari, Chrome and Opera. I haven't tested in IE8 because I
don't have it installed. Maybe someone wants to check it out? Here
is a demo page.
So I guess we should get in the habit of using:
<button type="submit">Submit</button>
相关文章推荐
- xcode更新到5.1,"Cast from pointer to smaller type 'int' loses information” in EAGLView.mm
- 错误 the type "xxxx" is defined in an assembly that is not refernced.You must add a reference to assem
- Xcode更新到5.1,"Cast from pointer to smaller type 'int' loses information” in EAGLView.mm
- Cannot refer to a non-final variable * inside an inner class defined in a different method"错误解析
- dereferencing pointer to incomplete type"
- 解决Unable to locate theme engine in module_path: "pixmap"
- "The file you are trying to open, '[filename]', is in a different format" Excel Error
- Exception in thread "main" org.hibernate.QueryException: illegal attempt to dereference collection
- 使用了<input type="submit" value="Submit" onclick="this.disabled=true" />不能提交
- 用Kdevelop创建工程时出现:"You need to select a cmake binary"
- psql: FATAL: role "root" is not permitted to log in
- iOS开发 - "Cast from pointer to smaller type 'int' loses information” 解决办法
- Glib交叉编译:g__cancellable_lock undeclared!&HEADER/C_IN undeclared!&undefined reference to "localeconv"
- Buttons in button bars should be borderless; use style="?android:attr/buttonBarButtonStyle" (and ?an
- Weka报错"Unknow data type INT. Add entry in weka/experiment/DatabaseUtils.props"
- Why is the window.close() works in IE browser but not FireFox? "Warning: Scripts may not close windo
- ERROR: "This virtual machine appears to be in use"
- Error:"failed to open the hard disk" in virtualbox
- Misleading error message in PowerShell script: "Invalid assignment expression. The left hand side of an assignment operator need
- Don't know how to iterate over supplied "items" in &lt;forEach&gt;解决办法