您的位置:首页 > 理论基础 > 计算机网络

Eric的使用XMLHTTP从服务端取得数据演示

2004-09-02 23:49 274 查看
使用XMLHTTP从服务端取得数据

在服务器直接使用Request.Form取值, 不需要另外解码编的, 无中文显示问题
适用于所有CGI服务端
服务端代码: ASP.NET with C# 版, 改成其它版本很容易, 我就不浪费时间了:]


<%@ Page Language="C#" %>


<%


string result = "";




for(int i = 0; i < Request.Form.Count; i++)






{


result += Request.Form.GetKey(i) + "=" + Request.Form.Get(i) + "&";


}




if(result == "")






{


result = "Empty Request!";


}


else






{


result = result.Substring(0, result.Length - 1);


}




Response.Write("Server Requested: " + result);


%>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: