<head> <meta charset="UTF-8"> <title></title> <script> function test(){ return true; } function fun(){ console.log("00000"); } </script> </head> <body> <!-- onsubmit=""onreset="fun()"必须在form标签之中 --> <form action="http://www.baidu.com" onsubmit="return test()" onreset="fun()"> <input name="ie" /> <input type="submit" value="提交" /> <input type="reset" value="重置" /> </form> </body>
javascript——onsubmit和onreset事件
猜你喜欢
转载自www.cnblogs.com/lyxcode/p/9509519.html
今日推荐
周排行