日期:2014-05-17  浏览次数:20577 次

Jsp Html 隐藏框的实现
<!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="html/css">
<!--
.STYLE1{
     font-size:large;
}
-->
</style>
</head>
<body>
<form name="form1" action="hidden.jsp" method="post">
<span class="STYLE1">隐藏框<br /></span>
<input type="hidden" name="hidden" value="Hello World!"/>
<hr  />
<input name="ok"  type="submit" value="我要看的隐藏文字。。。">

</form>
</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>
</head>
<body>
<h3>您隐藏的值是:</h3>
<h2>
<%
//设置request对象的字符编码机,避免中文显示的乱码
request.setCharacterEncoding("UTF-8");
String  hidden=request.getParameter("hidden");
out.println("<font color=\"red\">");
out.println(hidden);

%>
</h2>
</body>
</html>