正常jsp中 <form id='fors' onsubmit=' return test();'>
<input type='submit' onclick='fors.onsubmit=null'/>
这样的话 bottom就不会提交我现在不想在jsp中写onsubmit
写在js中
也就是jsp中 <form ><input type='submit' onclick='fors.onsubmit=null'/></form>
js中 load加载 document.forms[0].attachEvent('onsubmit', test);
就会在form中添加 test方法;但是和起初我想要的 return rest() 比少 return
这样无论 bottom onclick怎么写 都会提交form我想问的是
1.js怎么写才能添加return rest 这样的方式
2.还有什么好办法处理这个吗?