ajax+遮挡层,DIV遮罩层+AJAX异步请求

var isStrict = document.compatMode == "CSS1Compat";

jQuery.extend({

w: function() { var w = isStrict ? document.documentElement.scrollWidth : document.body.scrollWidth; return Math.max(w, $(window).width()); }

, h: function() { var h = isStrict ? document.documentElement.scrollHeight : document.body.scrollHeight; return Math.max(h, $(window).height()); }

});

function ShowDIV(thisObjID) {

$("#BgDiv").css({ display: "block", height: $.h(), width: $.w() });

var yscroll = document.documentElement.scrollTop;

$("#" + thisObjID).css("top", "100px");

$("#" + thisObjID).css("display", "block");

document.documentElement.scrollTop = 0;

}

function closeDiv(thisObjID) {

$("#BgDiv").css("display", "none");

$("#" + thisObjID).css("display", "none");

}

function addNewUser() {

$("#msg").show();

$("#msg").html("数据处理中,请稍后...");

var geturl = "UserInsert.ashx?user=" + $("#txtUserName").val().toLocaleLowerCase();

$.get(geturl,function(result) {

$("#msg").html(result);

}

);

}

#BgDiv{background-color:#e3e3e3; position:absolute; margin:0; z-index:9999; left:0; top:0; display:none; border:0; opacity:0.8;filter: alpha(opacity=80);-moz-opacity: 0.8;}

#DialogDiv{ display:none; color:#000000;position:absolute;width:400px; left:50%; top:50%; margin-left:-200px;  z-index:10000;background-color:#fff; border:1px #8FA4F5 solid; padding:1px;}

#DialogDiv h2{ margin:0; height:25px; font-size:14px; background-color:#8FA4F5; position:relative; padding-left:10px; line-height:25px;}

#DialogDiv h2 a{position:absolute; right:5px; font-size:12px; top:0px}

#DialogDiv .form{padding:10px;}

#msg{ display:none;color:Red; display:none; margin-top:10px; background-color:#ddd; height:100px; padding:6px 10px; overflow:auto}

添加用户关闭

角色:

用户名: 

添加失败:当前用户已存在

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值