日期:2014-05-16 浏览次数:20339 次
//test1.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'tpl.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script type="text/javascript" src="jQuery.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
<script type="text/javascript">
var c=0
var t
function start()
{
var txt1=Math.round(Math.random() * (500- 1) + 1);
var txt2=Math.round(Math.random() * (500- 1) + 1);
document. getElementById('txt1').value=txt1;
document. getElementById('txt2').value=txt2;
t=setTimeout("start()",60)
}
function over()
{
clearTimeout(t);
}
</script>
</head>
<body>
<input type="text" id="txt1" style="width:60px;height:50px;font-size:30px;">
<input type="text" id="txt2" style="width:60px;height:50px;font-size:30px;">
<div class="start" ><img src="images/start1.png" onclick="start()"/></div>
<div class="over"><img src="images/over.png" onclick="over()" /></div>
</body>
</html>
//test2.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'tpl.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This i