jsp 關鍵代碼如下:function CheckSubmit(){ //驗證實例名稱 var sname=$('#name').val().trim(); if(sname=='') { alert("實例名稱為必填項!"); return false; }}---------------------------------------------------------------------------------<form method="post" action="/create/save" onsubmit="return CheckSubmit();" id="formupdate"> <table style="width: 100% ;height:80px"> <tr> <td width="70">實例名稱:</td> <td width="235"> <input type="text" id="name" name="name" tabindex="1" /></td> </tr> </table> <input type="submit" value="提交" id="SubmitButton" /> </form> 在火狐及google瀏覽器中運行時,都能執行 form 表單的驗證功能。 但是在IE9 瀏覽器下,就跳過了這個驗證。求解!
添加回答
舉報
0/150
提交
取消