#2
rainic2006-12-19 17:26
|
我用以下程序:
function send_request(url){
http_request=false;
if(window.XMLHttpRequest){
http_request=new XMLHttpRequest();
if(http_request.overrideMimeType){
http_request.overrideMimeType("text/xml");
}
}
else if(window.ActiveXObject){
try{
http_request=new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
http_request=new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){}
}
}
if(!http_request){
window.alert("not")
return false
}
http_request.onreadystatechange=processRequest;
http_request.open("GET",url,true);
http_request.send(null)
}
function processRequest(){
if(http_request.readyState==4){
if(http_request.status==200){
form1.gwdw.value=http_request.responseText;
}else{
alert("数据传递发生错误!")
}
}}
function xd()
{
var f=document.form1;
var dw=f.xz.value
i=22
send_request("gwdwdata.asp?dw="+dw)
}
把gwdwdata.asp返回的数据显示在输入框内,可为什么显示的是乱码(中文乱,其它的都好的)呢?
显示内容如下:
??м??ҵ?????˾
我要如何才能让它显示正常呢?