81,092
社区成员
发帖
与我相关
我的任务
分享
<%@ page contentType="text/html; charset=GB2312" pageEncoding="gb2312"%>
<html>
<head>
<title>POS</title>
</head>
<body>
<form name="frm1">
<input type="input" name="sss" value="" />
<input type="button" value="submit" onclick="confirm();" />
</form>
</body>
</html>
<script language="javascript">
function confirm()
{
var value = document.frm1.sss.value;
alert("-----------" + value);
var url="index2.jsp?val="+value;
document.location.href=url;
}
</script>
<%@ page contentType="text/html; charset=GB2312" pageEncoding="gb2312"%>
<html>
<head>
<title>POS2</title>
</head>
<body>
Value---<%=request.getParameter("val")%>
</body>
</html>
request.setCharacterEncoding("gb2312")
<%@ page contentType="text/html; charset=GB2312" pageEncoding="gb2312"%>
//这里需要进行异常控制,就不一一描述了
java.net.URLDecoder.decode(request.getParameter("val"),"gbk");