www.gusucode.com > 2029网博士成品网站管理系统 PHP网站源码程序 > 2028/hospital/admin/js/hospital.js
//专家信息管理全选 $(document).ready(function() { $("#hosSelAll").click(function(){ var getObj = $('.hoscheckbox'); getObj.each(function(id) { if($("#hosSelAll")[0].checked==true){ this.checked=true; }else{ this.checked=false; } }); }); }); //专家修改表单提交 $(document).ready(function(){ $('#expertModForm').submit(function(){ $('#expertModForm').ajaxSubmit({ target: 'div#notice', url: 'post.php', success: function(msg) { if(msg=="OK"){ $('div#notice').hide(); $().alertwindow("专家信息修改成功","hospital_con.php"); }else{ $('div#notice').hide(); $().alertwindow(msg,""); } } }); return false; }); }); //专家发布表单提交 $(document).ready(function(){ $('#expertAddForm').submit(function(){ $('#expertAddForm').ajaxSubmit({ target: 'div#notice', url: 'post.php', success: function(msg) { if(msg=="OK"){ $('div#notice').hide(); $().alertwindow("专家信息发布成功","hospital_con.php"); }else{ $('div#notice').hide(); $().alertwindow(msg,""); } } }); return false; }); }); //弹出对话框 function Dpop(url,w,h){ res = showModalDialog(url, null, 'dialogWidth: '+w+'px; dialogHeight: '+h+'px; center: yes; resizable: no; scroll: no; status: no;'); if(res=="ok"){window.location.reload();} } //照片预览 $(document).ready(function(){ $('.preview').click(function(id){ var src=$("input#previewsrc_"+this.id.substr(8))[0].value; if(src==""){ return false; } $("body").append("<img id='pre' src='../../"+src+"'>"); var w=$("#pre")[0].offsetWidth; var h=$("#pre")[0].offsetHeight; $.blockUI({ message: "<img src='../../"+src+"' class='closeit'>", css: { top: ($(window).height() - h) /2 + 'px', left: ($(window).width() - w/2) /2 + 'px', width: $("#pre")[0].offsetWidth + 'px', backgroundColor: '#fff', borderWidth:'3px', borderColor:'#fff' } }); $("#pre").remove(); $(".closeit").click(function(){ $.unblockUI(); }); setTimeout($.unblockUI, 2000); }); }); //查看预约信息 $(document).ready(function(){ $("img.showyyinfo").click(function(){ var tdid=this.id; var str_id=tdid.split('_'); var id=str_id[1]; $.ajax({ type: "POST", url:"post.php", data: "act=showyyinfo&id="+id, success: function(msg){ $('div#yyinfo').remove(); $('html').append(msg); $.blockUI({message: $('div#yyinfo'),css:{width:'600px'}}); $('.yyinfoClose').click(function() { $.unblockUI(); }); $('.pwClose').click(function() { $.unblockUI(); }); } }); }); });