js弹窗代码样式

- 作者:forever -

js弹窗代码样式

============js


<script type="text/javascript">
//弹出隐藏层
function ShowDiv(show_div,bg_div){
document.getElementById(show_div).style.display='block';
document.getElementById(bg_div).style.display='block' ;
var bgdiv = document.getElementById(bg_div);
bgdiv.style.width = document.body.scrollWidth;
// bgdiv.style.height = $(document).height();
$("#"+bg_div).height($(document).height());
};
//关闭弹出层
function CloseDiv(show_div,bg_div)
{
document.getElementById(show_div).style.display='none';
document.getElementById(bg_div).style.display='none';
};
</script>


<span  class="f-dib f-vam"  onclick="ShowDiv('MyDiv','fade')">商品盈利优势盘点</span>

<div >
 
 
<div id="fade" class="black_overlay" style="position:fixed;">
</div>
<div id="MyDiv" class="white_content"  style="position:fixed;">
<div style="text-align: right; cursor: default; height: 40px;">
<span style="font-size: 16px;" onclick="CloseDiv('MyDiv','fade')"><img src="picture/124.jpg" width="100%"  style="width: 8%;"></span>
</div>
 
<img class="wxImg" src="picture/121.jpg" tppabs="" alt="" style="margin: 20px auto 10px; border: 1px solid rgb(158, 158, 158); display: block; width: 160px;  font-family: Helvetica, Arial, san-serif; white-space: normal;"/>
<p style="margin-top: 12px; font-weight: bold; text-align: center;     font-size: 20px;
    color: #030303; font-family: Helvetica, Arial, san-serif;">
    &nbsp;扫一扫二维码
</p>
<p style="text-align: center;">
    <strong><span style="font-size: 20px;">微信号</span></strong><span style="font-size: 20px;">: <span style="font-size: 20px; color: #FFFFFF; background-color: #FF0000;"><strong  style="padding: 5px;">znjy2012</strong></span></span>
</p>
 
 
 
</div></div>