您的位置:首页 > 其它

<button> 元素点击后刷新的问题

2011-10-24 13:00 459 查看
在做一个 chrome 插件时,发现里面的按钮 <button> 点击后会刷新页面,而用 <input type=button> 就不会。

后来查看 w3cschool 中 html 的 button 元素,原来<button> 也是要指定类型的 <button type=button> ,在 chrome 、firefox 等中,默认是 <button type=submit>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐