帮忙把js utf-8转成gb2312急救 谢谢!!

来源:百度知道 编辑:UC知道 时间:2024/05/09 19:35:50
//璇ユ簮镰佷笅杞借嚜www.51aspx.com(锛?锝侊綋锝愶綐锛庯絻锝忥綅)

var http_request = false;
function send_request(method,url,content,responseType,callback){
http_request=false;
if(window.XMLHttpRequest){//Mozilla娴忚?鍣?
http_request=new XMLHttpRequest();
if(http_request.overrideMimeType){
http_request.overrideMimeType("text/xml");
}
}
else{
try{
http_request=new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
http_request=new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){}
}
}
if(!http_request){
window.alert("涓嶈兘鍒涘缓XMLHttpRequest瀵硅薄瀹炰緥銆?);
return false;
}
if(responseType.toLowerCase()=="text"){
http_request.onreadystatechange=callback;
}else{

window.alert("鍝嶅簲绫诲埆鍙傛暟阌栾?銆?);
return false;
}

楼主,你好...

是这样子的,假如我们要转换文件的时候,我们也需要源文件
否则是转换不了的...

比如你上面写的,有很多乱码是吧,这样子必须有源文件我才可以给你转换,否则是不行的...

希望你能明白,有问题可以 hi 我

你下载个软件转一下就可以了,建议EDITPLUS 3这个就行。