易截截图软件、单文件、免安装、纯绿色、仅160KB

ajax乱码问题

JScript code:

function createRequest(){
if(window.XMLHttpRequest){
httpRequest=new XMLHttpRequest();
}else if(window.ActiveXObject){
try{
httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){}
}
}
}

function sendRequest(url,nam1,nam2){
createRequest();
id1=nam1
id2=nam2
httpRequest.open("GET",url,true);
httpRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=GB2312');

httpRequest.onreadystatechange=processResponse;
httpRequest.send(null);
}

function processResponse(){
if(httpRequest.readyState == 4){
if(httpRequest.status == 200){
//alert('200');
var result=httpRequest.responseText;
//var result=httpRequest.responseXML//.getElementsByTagName("div");
alert(result);

//var area=document.getElementById(id2);
//area.innerHTML='<textarea rows=7 cols=49>'+result.value+'</textarea>'


相关问答:

大家看看我的代码有什么问题(关于ajax的)

在家研究ajax,看了别人的一个网上购物商城项目的源代码,自己也来仿别人的东西练习练习,没想出问题了!一下的这些代码是我仿照别人写的。我是想让注册的人填写用户名,光标离开用户名后面的填写空白处后立刻利用aj ......

Visual Web Developer 2008安装AJAX问题!帮帮忙啊!

请哥哥姐姐弟弟妹妹叔叔阿姨们帮帮忙
我遇见了一个跟您一样的问题,就是我的 Visual Web Developer 2008 简体版 安装AJAX的时候也出现问题,我下载AjaxControlToolkit
了也解压了,但是没有安装AspAjaxExtSetu ......

Ajax dwr框架 返回函数

dwr框架 viewPaymentList()执行了 它的返回函数,listCallBack(data)中alert('asdf')没有反应,表格部分的代码没有运行,页面上没有增加列表,是什么原因。(编译没有出错)
java类 Operation
function ......

Ajax无刷新控件

<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1&q ......

Jquery1.3.2的AJAX问题

HuiFu.aspx页面


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="HuiFu.aspx.cs" Inherits="fdfdcs" %>

<!DOCTYPE html PUBLIC &q ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号