61,115
社区成员
发帖
与我相关
我的任务
分享
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<jsp:include page="box.jsp" flush="true">
<jsp:param name="color" value="red"/>
<jsp:param name="content" value="I love u!"/>
</jsp:include>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">
p{color:<%=request.getParameter("color") %>}
</style>
</head>
<body>
<p>今天天气真差</p>
<span><%=request.getParameter("content")%></span>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript">
document.getElementById("code").innerHTML=Math.floor(Math.random()*9000)+1000;
function aa(){
document.getElementById("code").innerHTML=Math.floor(Math.random()*9000)+1000;
}
function bb(){
if(document.getElementById("code").innerHTML!=f1.name.value){
alert("Input again!");
f1.name.focus();
}
else
f1.submit();
}
</script>
</head>
<body>
<form method="post" action="Questionnaire.html" name="f1">
<input type="text" name="name">
<span id="code"></span>
<input type="button" value="change" onclick="aa()">
<input type="button" value="submit" onclick="bb()">
</body>
</html>