100分!ajax请求错误
C# code:
<script type="text/javascript">
window.onload=function()
{
startRequest('get','../College.ashx','lxyc=2&time='+new Date().getTime()+'',ShowIt,true);
}
var xmlHttp1;
function createXMLRequest()
{
if(window.ActiveXObject)
{
xmlHttp1=new ActiveXObject("Microsoft.XMLHTTP");
}
else if(window.XMLHttpRequest)
{
xmlHttp1=new XMLHttpRequest();
}
else
{
alert("不能创建XMLHttpRequest");
}
}
function startRequest(method,url,pars,callbackfun,cache)
{
// alert(method+url+pars+callbackfun+cache);
if(typeof callbackfun != 'function'){
alert('The CallBackFun is not a function!');
}
if(cache){
pars += "&tmp="+Math.random();
}
createXMLRequest();
xmlHttp1.onreadystatechange = function(){
if(xmlHttp1.readyState==4)
{
if(xmlHttp1.status==200)
{
callbackfun(xmlHttp1);
xmlHttp1.abort();
}
else
{
xmlHttp1.abort();
相关问答:
想知道怎么在DW中运行Ajax
我运行的文件报这个错..
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening requir ......
查看源文件时出来的
<script type="text/javascript">
// <![CDATA[
Sys.Application.initialize();
Sys.Application.add_init(function() {
$create(Sys.UI._Upd ......
请哥哥姐姐弟弟妹妹叔叔阿姨们帮帮忙
我遇见了一个跟您一样的问题,就是我的 Visual Web Developer 2008 简体版 安装AJAX的时候也出现问题,我下载AjaxControlToolkit
了也解压了,但是没有安装AspAjaxExtSetu ......
先简单说明下,我要做的这个网站要开发用户综合社区,我们老板要的,象QQ那样的在线状态,并且即时接收消息,根据在线时长计算积分等等。我跟他说了这是网站,是Web应用程序,跟QQ那Windows应用程序不太一样,还要考 ......
s.com 域名下有一文件process.asp
VBScript code:
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.Add ......