jquery.validate 验证是在提交表单时验证,小弟我想用一个普通按钮验证,验证通过后执行某个脚本,该如何做呢
jquery.validate 验证是在提交表单时验证,我想用一个普通按钮验证,验证通过后执行某个脚本,该怎么做呢?
jquery.validate 验证是在提交表单时验证,我想用一个普通按钮验证,验证通过后不提交表单,而是执行某个脚本,该怎么做呢?
------解决方案--------------------
jquery.validate 验证是在提交表单时验证,我想用一个普通按钮验证,验证通过后不提交表单,而是执行某个脚本,该怎么做呢?
------解决方案--------------------
- HTML code
<!DOCTYPE HTML> <html> <head> <meta charset="gb2312" /> <title></title> </head> <body> <form action="?" onsubmit="return check(this)"> 帐号<input name="a" /> <input type="submit" /> </form> <script> function check(f){ if( f.a.value == '' ){ alert('请输入帐号'); f.a.focus(); return false; } test(); return false; } function test(){ alert('其他脚本') } </script> </body> </html>