<style type="text/css">
#container {} #pagetitle {font-size: 20px; font-weight: bold; width: 100%; text-align: center; } </style>-------------------------------------------------------------------------------------------
jQuery(function() { var today = new Date(); var yesterday = today.setDate(today.getDate()-1); jQuery("#day").datepicker({ dateFormat: "yy-mm-dd",maxDate: new Date(yesterday) }); var container=document.getElementById("container"); container.style.height=(document.body.clientHeight-20)+"px"; });-------------------------------------------------------------------------------------------
function sendEmail(){
var url = "$rc.contextPath/sendEmailDayReport.do";
var param = {"day":$("#day").val()}; $("#show").css("display",""); $("#bg").css("display",""); $("#data").load(url, param,function(res,status,xhr) { $("#show").css("display","none"); $("#bg").css("display","none"); //("success", "notmodified", "error", "timeout" 或 "parsererror") if(status == 'success'){ res = eval("(" + res + ")"); if(res=="1"){ alert("邮件发送成功!"); }else if(res=="0"){ alert("邮件发送失败!"); }else{ alert("系统发生异常!"); } }else if(status =='error'){ alert("ajax操作失败!"); } });}
----------------------------------------------------------------------------------------------
<div id="container" style="overflow-y:auto;padding-top:20px;">
<div id="bg" style="display:none;width:100%; height:100%; background:#aaa; filter:alpha(Opacity=50); position:absolute; left:0; top:0;"></div> <div id="show" style="display:none;padding:8px 0 8px 44px; margin-left:-80px; position:absolute; left:50%; top:344px; z-index:2; color:#000; background:url(images/loading.gif) no-repeat;">邮件发送中,请稍后...</div> <div id="data" style="display:none"></div>