<div class="codetitle"> <span><a style="CURSOR: pointer" data="41444" class="copybut" id="copybut41444" onclick="doCopy('code41444')"><u>复制代码</u></a></span>代码如下:</div> <div class="codebody" id="code41444"> <br><!DOCTYPE html> <br><html lang="ja" xmlns="http://www.w3.org/1999/xhtml"> <br> <br><meta charset="utf-8">; <br><title></title> <br><style type="text/css"> <br>.Div_Scroll { <br>位置:固定; <br>マージン:-10px; <br>可視性:非表示; <br>背景色:#808080; <br>不透明度:0.6; <br>z-インデックス:99; <br>} <br>.Div_Scroll_Content { <br>位置:相対; <br>マージントップ:20%; <br>幅:継承; <br>高さ:継承; <br>} <br>.Div_AlertWindow { <br>margin:auto; <br>幅:200ピクセル; <br>高さ:100ピクセル; <br>背景色:水色; <br>ボーダー:5px ソリッド #f00; <br>} <br></style> <br><script type="text/javascript"> <br>window.onload = function () { <br>varalertWindow = $("alertParent"); <br>alertWindow.style.width = window.screen.availWidth "px"; <br>alertWindow.style.height = window.screen.height "px"; <br>$("Sure").onclick = function () { <br>alertWindow.style.visibility = "hidden"; <br>} <br>} <br>function ShowAlert() { <br>varalertWindow = $("alertParent"); <br>alertWindow.style.visibility = "可視"; <br>} <br>$ = function (id) { <br>return document.getElementById(id); <br>} <br></script> <br></head> <br> <br><div id="alertParent" class="Div_Scroll"> <br><div class="Div_Scroll_Content"> <br><div id="AlertWindow" class="Div_AlertWindow"> <br><input type="button" id="Sure" value="アラート ダイアログを閉じる..." /> <br> </div> <br> <br> <br><div style="height:1300px;padding-top:200px;" > <BR><input id="alertButton" type="button" onclick="ShowAlert();" value="アラートダイアログを表示..."/> <br> <br></body> <br></html> <br> 追加罩层