button和submit

type=button 单纯是按钮功能
type=submit 是发送表单

input type="submit" name="b1" value="send" onClick="bt_submit_onclick()"
执行完onClick,转到action。可以自动提交不需要onClick。onclick这里可以不要。

input type="button" name="b1" value="send" onClick="bt_submit_onclick()"
执行完onClick,跳转文件在 js文件里控制。提交需要onClick。

posted @ 2017-02-20 11:07  Ajay_er  阅读(105)  评论(0编辑  收藏  举报