js动态创建阴影层

    <script type="text/javascript">
        function createShow(win) {
            var shadowDiv1 = window.document.createElement("div");
            shadowDiv1.id = "shadowDiv1";
            shadowDiv1.style.zIndex = "9998";
            shadowDiv1.style.position = "absolute";
            shadowDiv1.style.top = "0px";
            shadowDiv1.style.left = "0px";
            shadowDiv1.style.width = "100%";
            shadowDiv1.style.height = "100%";
            shadowDiv1.style.backgroundColor = "#000";
            window.document.body.appendChild(shadowDiv1);
            shadowDiv1.style.filter = "alpha(opacity=60)";
            var iframe = document.getElementById('iframe1');
            iframe.opener = win;
        }
    </script>
弹出阴影层
posted @ 2012-03-27 09:45  lance2008  阅读(486)  评论(0)    收藏  举报