jquery Ajax 提交

来源:互联网 发布:网络上赌博输钱找黑客 编辑:程序博客网 时间:2024/04/27 16:19

$.ajax({ url: 'login_check.asp',
            type: 'POST',
            cache: false,
            data: {loginName:loginName.value,password:password.value,chkcode:chkcode.value},
            dataType: 'html',
            timeout: 10000,
   global:false,
   beforeSend: function(XMLHttpRequest){
       ymPrompt.win({message:'正在登录,请稍后......',width:300,height:200,msgCls:'myContent',title:'用户登录',closeBtn:false});
   },
            error: function() {
       ymPrompt.close();
    ymPrompt.errorInfo({message:'由于网速过慢,操作未成功,请重试!',title:'信息提示',width:300,height:200});
   },
            success: function(root) {
      ymPrompt.close();
               if(root=="success"){
          ymPrompt.succeedInfo({message:'登录成功,等待进入系统!',title:'信息提示',width:300,height:200,okTxt:false});
          //document.getElementById("form1").submit();
       window.location.href = "frame.asp";
               }
               else{
       ymPrompt.errorInfo({message:unescape(root),title:'信息提示',width:300,height:200});
               }
            }
        });

原创粉丝点击