form表单中button按钮发送请求或者刷新页面的解决办法

button的type属性IE默认为button类型,而谷歌等则默认为submit类型

在form表单内用到的button按钮必须要定义其type属性

<form>
    <button type="button">button</button><!--不提交form-->
    <button type="submit">button</button><!--提交form-->
    <button>button</button><!--非IE提交form,IE不提交form-->
</form>

猜你喜欢

转载自www.cnblogs.com/webmc/p/11504525.html
今日推荐