浏览文章

文章信息

js阻止表单提交 15471

<form id="check_form" onsubmit="return false;" onclick="checkEnv()">
     <input type="hidden" name="type" value="check">
     <button id="check_button" type="submit">
            <span></span>
            <span></span>
            开始检测
            <span></span>
            <span></span>
     </button>
</form>

重点:onsubmit="return false;"  onclick="checkEnv()"

原创