1.
1 <%@ page language="java" contentType="text/html; charset=UTF-8" 2 pageEncoding="UTF-8"%> 3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 4 <html xmlns="http://www.w3.org/1999/xhtml" > 5 <head> 6 <title>标题页</title> 7 <script LANGUAGE="JavaScript"> 8 function doubleCheck(){ 9 if (document.readyState != null && document.readyState != 'complete') //判断页面是否执行完毕 10 { 11 alert("正在处理,请等待!"); //没有执行完毕提示,并返回false 12 return false; 13 } 14 else 15 { 16 alert("正在处理"); 17 return true; //执行完毕 18 } 19 } 20 </script> 21 </head> 22 <body> 23 <input type=text name="txt1" value="this is test!"> 24 <input type=button value="提交" onClick="doubleCheck()"> 25 </body> 26 </html>