//服务端代码
if(!Page.IsPostBack)
{
HttpCookie cook = new HttpCookie("op");
cook.Values.Add("en", "中国人");
Response.Cookies.Add(cook);
}
JS脚本:
<script language='javascript'>
document.location = "WebForm1.aspx"; //提交到页面时不会产生乱码
document.location = "WebForm1.aspx?id=10"; //这时加了参数之后提交到页面就会产生乱码
<script>请问加了参数之后产生乱码现象如何处理.
if(!Page.IsPostBack)
{
HttpCookie cook = new HttpCookie("op");
cook.Values.Add("en", "中国人");
Response.Cookies.Add(cook);
}
JS脚本:
<script language='javascript'>
document.location = "WebForm1.aspx"; //提交到页面时不会产生乱码
document.location = "WebForm1.aspx?id=10"; //这时加了参数之后提交到页面就会产生乱码
<script>请问加了参数之后产生乱码现象如何处理.
客户端也设置为"<meta http-equiv="Content-Type" content="text/html; charset=gb2312">"
还是乱码.
http://support.microsoft.com/default.aspx?scid=kb;zh-cn;313282