解决方案 »
- 百度地图 api 如何做类似携程电子地图
- 【急!!】两个JS文件冲突,求达人帮我看看,该怎么解决。
- jQuery click append 之后不能对append内的对象进行操作?
- IE隐藏关闭按钮
- 表格行数不确定,如何为表格最后一行指定样式?
- 在线等待,按钮单击事件和页面双击事件冲突
- 一个关于弹出式菜单的问题,急!!!
- 又有问题了:(
- sum=0;下面在一个for循环中sum=sum+document.form1.planValue[i].value;为什么得到的sum值是把数字作字符串相连接,而不是数字相加呢?
- 不知道可不可以从一串字符的后面按照规则切掉字符?
- 行: 59 错误: 属性“mycheck”的值为 null、未定义或不是 Function 对象
- 问下var arr=new Array()和 var arr=[] 的区别。
$(this).show();
});
$("#loading").ajaxStop(function(){
$(this).hide();
});
protected void Page_Load( object sender, EventArgs e )
{
btnQuery.Attributes.Add("onclick", "openProgressDiv();"); if ( !IsPostBack )
{
txtStartDate.Text = DateTime.Now.ToString( "yyyy-MM-" ) + "01";
txtEndDate.Text = DateTime.Now.ToString( "yyyy-MM-dd" );
BindGlobalShare( );
BindCardType( );
OnLineOrderDataBind( );
}
}
前台遮罩层js:
<script type="text/javascript">
function openProgressDiv() {
addMask();
var newDiv = document.createElement("div");
newDiv.id = '_p_progress';
newDiv.style.position = "absolute";
newDiv.style.zIndex = "9999";
newDivWidth = 100;
newDivHeight = 100;
newDiv.style.width = "210px";
newDiv.style.height = "25px";
newDiv.style.top = ($(document).height() - 25) / 2 + "px";
newDiv.style.left = ($(document).width() - 210) / 2 + "px";
newDiv.style.background = "#EFEFEF";
newDiv.style.padding = "10px 20px 20px 20px";
newDiv.innerHTML = "<h>正在处理,请耐心等待...</h>";
document.body.appendChild(newDiv);
} function closeProgressDiv() {
removeMask();
if (docEle('_p_progress')) {
document.body.removeChild(docEle('_p_progress'));
}
} var docEle = function () {
return document.getElementById(arguments[0]) || false;
} function addMask() {
if (docEle('_p_mask')) {
document.body.removeChild(docEle('_p_mask'));
}
//mask遮罩层,原理就是搞一个全屏的半透明的div,使鼠标无法点击到后面滴元素
var newMask = document.createElement("div");
newMask.id = '_p_mask';
newMask.style.position = "absolute";
newMask.style.zIndex = "1"; // 这个值要比你的div弹出层的要小,否则就回遮住你要显示的div
_scrollWidth = Math.max(document.body.scrollWidth,
document.documentElement.scrollWidth);
_scrollHeight = Math.max(document.body.scrollHeight,
document.documentElement.scrollHeight);
newMask.style.width = _scrollWidth + "px";
newMask.style.height = _scrollHeight + "px";
newMask.style.top = "0px";
newMask.style.left = "0px";
newMask.style.background = "#33393C";
newMask.style.filter = "alpha(opacity=40)";
newMask.style.opacity = "0.40";
document.body.appendChild(newMask);
} function removeMask() {
if (docEle('_p_mask')) {
document.body.removeChild(docEle('_p_mask'));
}
}
</script>