手记

基于DOMWindow的弹出提示框

 

$(function(){     $('#close_msg_box').click(function(){closeMsgBox();}) }) /**  * 显示友好弹出层  * msg 显示内容  * @param msg 显示消息内容  * @param height 显示窗口的高度 默认273  * @param width  显示窗口的宽度 默认694  */ function openMsgBox(msg,height,width){     if(height==undefined)height=273;     if(width==undefined)width=694;     $('#msg_box_content').html(msg);     $.openDOMWindow({         height:height,         width:width,         modal:1,         borderColor:'#0C0E35',         windowBGColor :'none',         borderSize:'3',         overlayOpacity :'55',         windowSourceID:'#msg_box',         windowPadding:0,     }); } function closeMsgBox(){     $.closeDOMWindow({}); }

 

#msg_box{display:none;}     .msg_box{background:url(/Public/images/msg_box_bg.png);width:692px;height:271px;border:1px solid #EDEDED;}         .msg_box_head{height:35px;width:100%;}             .msg_box_head a{cursor: pointer;display:block;height:35px;float:right;width:80px;font-size:20px;line-height:35px;text-align:center;}

 

<div id="msg_box"> <div class="msg_box">     <div class="msg_box_head"><a id="close_msg_box">关闭</a></div>     <div id="msg_box_content"></div> </div> </div>

 

0人推荐
随时随地看视频
慕课网APP