js前端防止默认表单提交

代码如下:

document.forms[0].onsubmit=function(){return false;};

原文地址:https://www.cnblogs.com/jiangxiaofan/p/3429739.html