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

ajax简单校验


function saveObj(){
    var userName = document.getElementById("userName").value;  
    checkUserName(userName);
}
//使用ajax实现页面无刷新功能; 
    var xmlHttpRequest;
    function createXMLHttpRequest(){
      if(window.XMLHttpRequest){
      xmlHttpRequest = new XMLHttpRequest();
      }else if(window.ActiveXObject){
      try{
        xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
        }catch(e){
        try{
          xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
        }catch(e1){}
        }
      }
    }
    
    
    //实现用户名校验技术;
    function checkUserName(userName){
      createXMLHttpRequest();      
        var url="/sxyj/jsp/SystemUserVOAction.do?userName='"+userName+"'";    
      xmlHttpRequest.open("post",url);
      xmlHttpRequest.onreadystatechange = checkUser;      
      xmlHttpRequest.send(null);    
    }
    
  function checkUser(){
      if(xmlHttpRequest.readyState==4){
      if(xmlHttpRequest.status==200){
      var user="fail";
        var mess = xmlHttpRequest.responseText;
        if(mess=="success"){
            alert("此用户已存在");
            document.getElementById("txt_Name").focus();  
            return;
        }else{
            document.f


相关文档:

Ajax/json/js 学习备忘

闭包概念:闭包就是能够读取其他函数内部变量的函数。
由于在Javascript语言中,只有函数内部的子函数才能读取局部变量,
因此可以把闭包简单理解成“定义在一个函数内部的函数”。
function f1(){
    n=999;
    function f2(){
      alert(n);
    }
    return f2;
  }
......

asp.net使用ajax后如何在客户端弹出提示对话框

//平常调用javascript方法
ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert'Weclome!!!');</script>");
背景不为白色的方法:
Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('添加失败,请联系技术员!') ......

ajax问题严重

      最近,写了个ajax程序。实现了定位地图,因为了ajax的动态请求,所以,地图是实时扫描的,但是,问题困惑了半个月,今天在和学长聊天的时候,终于想清楚了。
      ajax在本程序中的任务就是对八个读卡器点进行动态请求数据库数据,然后,根据数据库索引数扫描地图上该点的 ......

ajax实例

//初始化对象并发出XMLHttpRequest请求
 xmlHttp= false;
 if (window.XMLHttpRequest)
 {           //Mozilla等其他浏览器
  xmlHttp= new XMLHttpRequest();
   if (xmlHttp.overrideMimeType)
   {
  & ......

Ajax提交数据更新服务器neir

  1,本例子实现一个Ajax更改数据的例子
如图:
1,新建xml文件;其内容如下:
<?xml version="1.0" encoding="utf-8"?>
<userinfo>
<user>
<id>I</id>
<name>wtq</name>
<password>123456</password>
<phone>0595-8553 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号