All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
C#中try-catch
ASP.NET,2.0,页面状态持续程序_[Asp.Net教程]
asp.net页面导出为Word文档_[Asp.Net教程]
初学,ASP.NET,AJAX,(三):使用,UpdatePanel_[Asp.Net教程]
应该学会:ASP.NET的,Session,详解_.net资料_编程技术
ASP.NET中散列加密密码_[Asp.Net教程]
SQL SERVER数据库开发之触发器的应用_[SQL Server教程]
GridView属性、方法和事件
Asp.net动态生成页面控件的办法_[Asp.Net教程]
Asp.net,备份和还原SQL,Server及压缩Access数据库_[Asp.Net教程]
Reading number is top 10 pictures
The little woman's bright wire3
Cesarean section, bloody, silently into it!2
人美胸美腿更美3
In the world the most mysterious 21 place landscape2
西班牙山村小景3
A man's favorite things11
Female model behind the bitterness, often being overcharged5
非常漂亮的泳装美女
再发一张清纯美眉的照片
Group of female porn in 《westwards》, uninhibited woman threatened to not the bottom line2
Download software ranking
Unix video tutorial1
C++教程第四版
Boxer's Top ten classic battle2
Unix video tutorial12
C#编程思想
Sora aoi, the nurse, uniform ,nursing assistant
Twenty piece of palm leaf
传奇私服架设教程
Tram sex maniac 2 (H) rar bag9
Sora aoi‘s film--Lust fan wall
归海一刀 published in(发表于) 2014/3/16 2:51:43 Edit(编辑)
AJAX在Post中文的时候解决乱码的方法_[AJAX教程]

AJAX在Post中文的时候解决乱码的方法_[AJAX教程]

AJAX在Post中文的时候解决乱码的方法_[AJAX教程]

加上设置字符编码的方法:
response.setHeader("charset","gb2312");

********************************************
看到的说明原文如下:


用Ajax来GET回一个页面时,RESPONSETEXT里面的中文多半会出现乱码,这是因为xmlhttp在处理返回的responseText的时候,是把resposeBody按UTF-8编码进解码考形成的,如果服务器送出的确实是UTF-8的数据流的时候汉字会正确显示,而送出了GBK编码流的时候就乱了。解决的办法就是在送出的流里面加一个HEADER,指明送出的是什么编码流,这样XMLHTTP就不会乱搞了。


PHP:header('Content-Type:text/html;charset=GB2312');
ASP:Response.Charset("GB2312")
JSP:response.setHeader("Charset","GB2312");


*********************


http://blog.csdn.net/ruanruoshi/archive/2006/03/31/645814.aspx







添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.