当前位置: 代码迷 >> Web前端 >> loading.及网摘JQuery范例
  详细解决方案

loading.及网摘JQuery范例

热度:1227   发布时间:2012-10-20 14:12:47.0
loading......及网摘JQuery实例
	function createDiv(){
		jQuery("body").css({overflow:"hidden"});
		var browserwidth = jQuery(window).width();
		var browserheight=jQuery(window).height();
		var scrollleft = jQuery(window).scrollLeft();
		var scrolltop = jQuery(window).scrollTop();
		var height =browserheight+ scrolltop;
		var width =browserwidth + scrollleft;
		var waitDiv = jQuery("<div/>").css({position:'absolute',display:'block',border:"0px solid #FFFFFF",background:"#FFFFFF",filter:"AlPha(opacity=60)"})
					.css({"top":scrolltop+"px","left":scrollleft+"px"})
					.css("text-align","center")
					.css("width",browserwidth+"px").height(browserheight+"px").appendTo(jQuery("body"));
		waitDiv[0].oncontextmenu =function(){return false;};
		waitDiv[0].keypress=function(){return false;};
		//var showDiv = jQuery("<div/>").css({"margin-top":(browserheight-100)/2+"px"}).height("100px").width("100px").appendTo(waitDiv);
		//jQuery("<img src='<%=request.getContextPath()%>/images/loading.gif' align='middle'>").appendTo(showDiv);
		var showDiv = jQuery("<div><img src='<%=request.getContextPath()%>/images/loading.gif' align='middle'></div>").css({"margin-top":(browserheight-100)/2+"px"}).height("100px").width("100px").appendTo(waitDiv);
	}

?

  相关解决方案