標籤:
<html><head><title></title></head><body> <form name="example" onsubmit="return checkForm()" action="${ctx }threeLesson/addThreeLesson" method="post"> <table id="loading" style="display:none"> <tr> <td width="80px" style="text-align:right;"></td> <td> <div class="loading-indicator" style="color: red; font-size: 25px;" >正在執行中 , 請稍候…… (*^__^*)</div> </td> </tr> </table> <table> <tr> <td> <table> <tr> <td valign="top" width="150px" style="text-align:left;"> </td> <td width="150px" style="text-align:left;"> <input id="login" type="submit" value="確 定"/> <input type=‘button‘ onclick=‘javascript:history.go(-1)‘ value="返 回" /> </td> </tr> </table> </td> </tr> </table> </form></body><script type="text/javascript"> function checkForm(){ var lDiv = document.getElementById("loading"); if(lDiv.style.display==‘none‘){ lDiv.style.display=‘block‘; } }</script></html>
jQuery 實現最簡單的form表單提交 Loding 功能