时间:2021-07-01 10:21:17 帮助过:58人阅读
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Session.CodePage=936%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Page(gb2312)-jb51.net</title>
</head>
<body>
<script type="text/javascript">
document.write("<a href='t2.asp?keyword=" + escape("木子屋") + "'>木子屋</a>");
</script>
<br/>
<%
Response.Write(Request.QueryString("keyword"))
%>
</body>
</html>
t2.asp(utf-8编码):
代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Page(utf-8)-jb51.net</title>
</head>
<body>
<script type="text/javascript">
document.write("<a href='t1.asp?keyword=" + escape("木子屋") + "'>木子屋</a>");
</script>
<br/>
<%
Response.Write(Request.QueryString("keyword"))
%>
</body>
</html>