您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
免费发信息
三六零分类信息网 > 六盘水分类信息网,免费分类信息发布

AJAX之xmlHttp

2024/2/19 23:06:17发布21次查看
ajax之xmlhttp
<script type="text/javascript" language="javascript"> <!-- //以xml求取数据 function xmlpost(theemail) { var webfileurl = "../user/checkuser.aspx?logonname=" + theemail; var result = ""; if (window.activexobject) { xmlhttp = new activexobject("microsoft.xmlhttp"); } else if (window.xmlhttprequest) { xmlhttp = new xmlhttprequest(); } //var xmlhttp = new activexobject("msxml2.xmlhttp"); xmlhttp.open("post", webfileurl, false); xmlhttp.setrequestheader("content-type","application/x-www-form-urlencoded"); xmlhttp.send(""); xmlhttp.onreadystatechange=function() { if (xmlhttp.readystate==4) { result = xmlhttp.responsetext; } } if(xmlhttp.status!=200) { alert ('网络故障(xmlhttp.status='+xmlhttp.status+'),请稍后再试!'); } result = xmlhttp.responsetext;  result = result.substring(0,result.indexof("?ex")); if(result != "false") { return true; } else { return false; } } //--> </script>''' <summary>''' 检测用户是否存在<文件名:../user/checkuser.aspx>''' </summary>''' <remarks>created by dzh @2006/06/27 18:22</remarks>partial class web_user_checkuser inherits system.web.ui.page protected sub page_load(byval sender as object, byval e as system.eventargs) handles me.load if request.querystring("logonname") is nothing then response.write("false" + "?ex") response.end() exit sub end if if (new easyclick.easybusiness.userbusiness).getuserbylogonname(request.querystring("logonname").tostring) is nothing then response.write("false" + "?ex") response.end() exit sub else response.write("true" + "?ex") response.end() exit sub end if end subend class
以上就是ajax之xmlhttp的内容。
六盘水分类信息网,免费分类信息发布

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录