<button> 元素点击后刷新的问题
2011-10-24 13:00
459 查看
在做一个 chrome 插件时,发现里面的按钮 <button> 点击后会刷新页面,而用 <input type=button> 就不会。
后来查看 w3cschool 中 html 的 button 元素,原来<button> 也是要指定类型的 <button type=button> ,在 chrome 、firefox 等中,默认是 <button type=submit>
后来查看 w3cschool 中 html 的 button 元素,原来<button> 也是要指定类型的 <button type=button> ,在 chrome 、firefox 等中,默认是 <button type=submit>
相关文章推荐
- <转>,防止刷新/后退引起的重复提交问题的Java Token代码,非Struts
- Android实战简易教程<三十七>(ListView中点击button跳转到拨号界面实例)
- <Unity UGUI><EasyTouch> 使用EasyTouch, 摇杆在Dynamic模式下,点击UI控件也会弹出的问题解决
- 在IE6、8中 <a>、button点击事件(onclick)没得反应经验总结
- 点击<a href="#"/>后屏幕滚动问题
- asp.net: 点击<asp:button/>按钮时有时不能立即执行问题
- 写前端页面时,按钮明明是<button>,为什么点击时会提交表单,刷新页面呢?
- Iframe 不刷新的问题. 当涉及到与数据库交互时. 用Button不能更新IFrame 好像有缓存在浏览器中, 用<a> 就没问题了
- button在底部的多个view切换<实例三触摸和点击实现3D切换>
- 在html中点击<button>自动提交表单问题
- <转>防止刷新/后退引起的重复提交问题的Java Token代码,非Struts
- <Button>按钮点击变换,<EditText>组建功能,<TditView>文本跑马效果,滚动视图
- 几个页面的问题一起记录了/el表达式判断/<c:import>传值/BootstrapDialog.show关闭时刷新/
- 使用<a>标签提交action会执行两次后台方法的原因(反射机制小实例问题的解决)
- 弱智的问题:error C2143: syntax error : missing ';' before '<cv-qualifer>'
- <a>标签的点击事件
- HTML <button> 标签
- 点击<a>关闭div
- 阿里云部署Docker(6)----解决删除<none>镜像问题
- <浅谈一个大电容并联一个小电容的问题>