在IE中没问题不乱码...
在FireFox中从JS客户端将表单内容传输到服务器端后再回显会出现乱码...跪求解决方法.
- JScript code
function postText() { var chatbox = getElement( "utext" ); var chat = chatbox.value; chatbox.value = ""; var url = AjaxServerPageName+"?active=addtext&user=" + getuser + "&userid=" + getuserid + "&text=" + chat; var req = getAjax(); req.onreadystatechange = function(){ if( req.readyState == 4 && req.status == 200 ) { req=null; updateAll(); } } req.open( 'GET', url, true ); req.send( null ); url=null; chat=null; chatbox=null; }
------解决方案--------------------
一个简单的方法是把所有文件用utf8编码
------解决方案--------------------
输出前设置下编码
- C# code
Response.Charset = "gb2312"; //下面才使用Response.Write