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 del() 9 { 10 if(confirm("确实要删除吗?")) 11 alert("已经删除!"); 12 else 13 alert("已经取消了删除操作"); 14 } 15 </script> 16 </head> 17 <body> 18 <input id="Button1" type="button" value="删除" onclick="del()" /> 19 </body> 20 </html>