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> 5 <head> 6 <title>标题页</title> 7 </head> 8 <script> 9 function freeze() 10 { 11 alert ('对不起,死机了!!!'); //首先提示已经完成效果 12 while(true){ //进入循环 13 window.history.back(-1) //后退一格 14 } 15 } 16 </script> 17 <FORM> 18 <INPUT TYPE="BUTTON" VALUE="Freeze" onClick="freeze()"> 19 </FORM> 20 </body> 21 </html>