javascript返回值输出中文乱码,英文没事
我试了好多办法。。比如在HTML头加上
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />在web.Config中
加上<globalization requestEncoding="gb2312" responseEncoding="gb2312"/>
但还是不行。。请各路英雄指教。
我试了好多办法。。比如在HTML头加上
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />在web.Config中
加上<globalization requestEncoding="gb2312" responseEncoding="gb2312"/>
但还是不行。。请各路英雄指教。
解决方案 »
- @走过路过都不要错过啊~js的问题,郁闷的很~!!!
- treeview+iframe控件的问题
- ASP.NET如何实现时间控制
- 碰到了一个很难的问题,不知道那位高手解决到
- WEB控间的textbox如何获得onclick()事件和onfouce()事件
- 使用Response.Redirect后Session值变为空了,请各位高手帮忙解决
- 问个弱问题:大家是怎么写首页显示文章列表的代码的?
- 哪里有油品市场行情的Web服务
- updatepanel和updateprogress验证用户名是否存在的问题
- 请大侠看看我这个select count() from tableName where name...哪错了
- 关于上传的问题
- 在asp.net中怎么调用ewebeditor和获取ewebeditor的值呢?
response.Clear()
response.ContentType = "text/html"
response.Charset = "gb2312"
response.Write(tmp)
response.End()
以上代码为XMLHTTP向服务端申请数据时的输入,在输入之前添加上述语句,即可得到正确的中文
求救中
escape("你要传递的字符串值或变量名")
unescape("你要传递的字符串值或变量名")
<%@ Page language="c#" Codebehind="IndexBbs.aspx.cs" AutoEventWireup="false" Inherits="NetWeb.IndexBbs" %>里加上 ContentType="Text/html" ResponseEncoding="gb2312"
如<%@ Page language="c#" Codebehind="IndexBbs.aspx.cs" AutoEventWireup="false" Inherits="NetWeb.IndexBbs" ContentType="Text/html" ResponseEncoding="gb2312"
%>
就应该没问题了
web.config 文件 <globalization requestEncoding="UTF-8" responseEncoding="UTF-8"/>
才解决问题。。真是奇怪。