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();
相关问答:
第14章 的树型菜单的例子不能在IE中正常显示(树的结构可以展开,但展开后再点击就不能收缩了),但能在谷歌浏览器中使用,有看此书的朋友能指点下吗?
好贴 呵
dfgfgfgffffff
谢谢。
......
在家研究ajax,看了别人的一个网上购物商城项目的源代码,自己也来仿别人的东西练习练习,没想出问题了!一下的这些代码是我仿照别人写的。我是想让注册的人填写用户名,光标离开用户名后面的填写空白处后立刻利用aj ......
我在webRoot->idc->report->report_add.jsp页面中用ajax提交到action总是报这错
140 ERROR RequestProcessor:664 - Invalid path /idc/report/report/report_distb was requested
找不出原因,我又在新建 ......
function checkCallBack(){
if(xmlHttp.readyState==4){
if(xmlHttp.status==200){
var result = xmlHttp.responseText;
......
各位:
我想实现:用户在点击页面的提交按钮(server端按钮),先通过页面AJAX检查页面数据,再根据验证的结果决定是否提交数据(提交数据的代码是通过SERVER端代码提交的.
我用以下方法,发现系统实现不了:
......