国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
js的彈出對(duì)話框

<html>
<head>
    <title></title>
    <script type="text/javascript">
        function sAlert(str) {
            var msgw, msgh, bordercolor;
            msgw = 300;//提示窗口的寬度
            msgh = 200; //提示窗口的高度
            titleheight = 25; //提示窗口標(biāo)題寬度
            bordercolor = "#FF3C00"; //提示窗口的邊框顏色
            titlecolor = "#D2CECE";//提示窗口的標(biāo)題顏色
            var sWidth, sHeight;
            sWidth = document.body.clientWidth; //bod對(duì)象寬度
            if (window.innerHeight && window.scrollMaxY) {
                sHeight = window.innerHeight + window.scrollMaxY;
            }
            else if (document.body.scrollHeight > document.body.offsetHeight) {
                sHeight = document.body.scrollHeight;
            }
            else {
                sHeight = document.body.offsetHeight;
            } //以上得到整個(gè)屏幕的高
            var bgObj = document.createElement("div"); //創(chuàng)建一個(gè)div對(duì)象
            bgObj.setAttribute("id", "bgDiv");
            bgObj.style.position = "absolute"; //絕對(duì)定位
            bgObj.style.top = "0"; //頂部為0
            bgObj.style.backgroud = "#777"; //背景顏色
            bgObj.style.filter = "progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishiOpacity=75)"; //ie瀏覽器透明度設(shè)置
            bgObj.style.opacity = "0.6"; //透明度(火狐中)
            bgObj.style.left = "0"; //左邊為0
            bgObj.style.width = sWidth + "px";
            bgObj.style.height = sHeight + "px";
            bgObj.style.zIndex = "100"; //層的z軸位置
            document.body.appendChild(bgObj);

            var msgObj = document.createElement("div");
            msgObj.setAttribute("id", "msgDiv");
            msgObj.setAttribute("align","center");
            msgObj.style.position = "absolute";
            msgObj.style.top = "30%";
            msgObj.style.backgroud = "white";
            msgObj.style.border = "1px solid "+bordercolor;
            msgObj.style.left = "35%";
            msgObj.style.font = "12px/1.6en Verdana,Geneva,Arial,Helvetica,sans-serif";
            msgObj.style.width = msgw + "px";
            msgObj.style.height = msgh + "px";
            msgObj.style.textAlign = "center";//文本位置屬性,居中
            msgObj.style.lineHeight = "25px"; //行間距
            msgObj.style.zIndex = "101"; //層的z軸位置


            var title = document.createElement("h4"); //創(chuàng)建一個(gè)h4對(duì)象
            title.setAttribute("id", "msgTitle"); //為h4對(duì)象添加標(biāo)題
            title.setAttribute("align", "right"); //文字的對(duì)齊方式
            title.style.margin = "0"; //浮動(dòng)
            title.style.padding = "3px"; //浮動(dòng)
            title.style.backgroud = titlecolor; //背景顏色
            title.style.filter = "progid:DXImageTransform.Microsoft.Alpha(startX=20,startY=20,finishX=100,finishY=100,style=1,opacity=75,finishiOpacity=100);";
            title.style.opacity = "0.75"; //透明
            //title.style.border = "1px solid" + bordercolor;
            title.style.height = "25px"; //高度
            title.style.font = "12px Verdana,Geneva,Arial,Helvetica,sans-serif"; //字體屬性
            title.style.color = "white"; //文字顏色
            title.style.cursor = "pointer";//鼠標(biāo)樣式
            title.innerHTML = "<a href=\"#\">關(guān)閉</a>";//顯示的文字
            title.onclick = function () {
                document.body.removeChild(bgObj);//移除遮罩層
                document.getElementById("msgDiv").removeChild(title); //在提示框中移除標(biāo)題
                document.body.removeChild(msgObj);//移除提示框
            }
            document.body.appendChild(msgObj); //在body中畫出提示框?qū)?
            document.getElementById("msgDiv").appendChild(title); //在提示框中增加標(biāo)題
            var txt = document.createElement("p");
            txt.style.margin = "0";//文本浮動(dòng)
            txt.setAttribute("id", "msgTxt");//為p屬性增加id屬性
            txt.innerHTML = str;//把傳進(jìn)來(lái)的值賦給p屬性
            document.getElementById("msgDiv").appendChild(txt); //把p屬性增加到提示框中            
        }   
    </script>
</head>
<body>
<a href="#" onclick="sAlert('<a href=</body>
</html>

打開(kāi)APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
javascript 自制提示框
常用的腳本驗(yàn)證
點(diǎn)擊彈出窗口層,并且背景變暗漸變 - 網(wǎng)頁(yè)特效
Javascript不斷隨機(jī)生成正方形
制作一個(gè)自動(dòng)刷新的腳本
點(diǎn)擊不同鏈接彈出不同div層
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服