jquery javascript写的loading
var mask="<div id='m'></div>";
var loading="<div id='loadingDiv' style=''><img src='../../theme/blue/p_w_picpaths/blue/loading-blue.gif'></img>主备切换中.......</div>";
$("body").prepend(loading).prepend(mask);
$("#loadingDiv").css("position","absolute").css("width","221px").css("height","51px").css("background-color","#fff").css("text-align","left").css("z-index","9999").css("top","201px").css("left","471px");
$("#m").width($(document).width()).height($(document).height()).css("background-color","#ece9d8").css("filter","alpha(opacity=60)").css("-moz-opacity","0.4").css("position","absolute").css("z-index","10");
转载于:https://blog.51cto.com/4247649/1547521