分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 技术分享

ajax参数

发布时间:2023-09-06 01:15责任编辑:林大明关键词:暂无标签
 1 $.ajax({ 2 ????????type: "GET", 3 ????????url: "Login.ashx", 4 ????????dataType: "text", 5 ????????cache: false,//true使用缓存 。 false不使用缓存 6 ????????async: true,//使用 true beforeSend方法会有延迟现象 7 ????????data: { "Method": "Login_User", "dt": JSON.stringify(json) }, 8 ????????beforeSend: function () { 9 ????????????$(‘#btn_log‘).html(‘正在登陆,请稍后……‘);10 ????????????$(‘#btn_log‘).attr(‘disabled‘, ‘disabled‘);11 ????????},12 ????????success: function (data) {13 ????????????var json = JSON.parse(data);14 15 ????????????var log = parseInt(json.code);16 ????????????if (log > 0) {17 ????????????????window.location.href = "index.html";18 ????????????????return false;19 ????????????} else {20 ????????????????alert("用户名或密码错误,请重新输入");21 ????????????????$(‘#btn_log‘).html(‘登   陆‘);22 ????????????????$(‘#btn_log‘).removeAttr(‘disabled‘);23 ????????????}24 ????????},25 ????????error: function () {26 ????????????alert(‘网络错误,请检查网络‘);27 ????????????$(‘#btn_log‘).html(‘登   陆‘);28 ????????????$(‘#btn_log‘).removeAttr(‘disabled‘);29 ????????}30 ????});
ajax参数

ajax参数

原文地址:http://www.cnblogs.com/liujianshe1990-/p/7631580.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved