<div class="codetitle"> <span><a style="CURSOR: pointer" data="50007" class="copybut" id="copybut50007" onclick="doCopy('code50007')"><u>コードをコピーします</u></a></span> コードは次のとおりです:</div> <div class="codebody" id="code50007"> <br><script type="text/javascript" src= "http://img.zzl.com/script/jquery/jquery-1.4.2.min.js"></script><br><script type="text/javascript"> $(function () { <br>$("#open").click(function() { <br>openDialog(a1); //DIV の ID を直接書き込むだけで呼び出します <br>}); <br>} ); <br>var openDialog = function(o) { <br>var ダイアログ = new zzlDialog(o); <br>} <br>var zzlDialog(o) ) { <br>this.init = function() { <br>/* ダイアログの初期化*/ <br>var XBox = ' <br><div id="mask"/> = ワイ"> <br><div id="nie"> <br><tr> ><td> <br></td> <br></tr> 🎜 ><tbody> <br><tr> <br><tdcolspan="2">' <br></td</ tr> <br></tbody> <br></div> <br>$(document.body).append(XBox); ; <br><br>this.cssInit = function() { <br>/* CSS 初期化*/ <br>$("#wai").css({ "padding": "10px", "background": " #000", "フィルター": "Alpha(Opacity='50')", "位置": "絶対" }); <br>$("#nie").css({ "位置": "絶対" " , "z-index": "1000" }); <br>$("#nie>table").css({ "border": "1px ソリッド rgb(55,119,188)", "border-collapse": "折りたたむ ", "背景": "#fff" }); <br>$("#nie>table>thead>tr").css({ "背景": "rgb(0,94,172)", "color" : "#fff"、"高さ": "30px"、"font-size": "14px"、"font-weight": "bold" }); ( "td").css({ "padding": "5"}); <br>/* ボディ内部の配置*/ <br>$("#nie").css({ "top": "50px" } ); <br>$("#nie").css({ "left": "50px" }); <br>/* 閉じるボタン*/ <br>var $close = $("#nie>table> ; thead").find("td").next("td"); <br>$close.html("<span>Close</span>"); <br>$close.css({ " text-align": "right", "padding-right": "5px" }); <br>$close.find("span").css({ "font-weight": "normal", "cursor" : "hand" }); <br>$close.find("span").click(function() { new zzlDialog().closes(); }); <br>/* 外部シャドウの追加、位置、合計サイズは内部コンテンツによって制御されます*/ <br>$("#wai").css({ "width": ($("#nie>table").width() 16) "px", "height ": ($("#nie>table").height() 16) "px" }); <br>$("#wai").css({ "top": $("#nie"). Position( ).top - 8 "px", "left": $("#nie").position().left - 8 "px", "z-index": $("#nie").css( "z -index") }); <br>// $("#wai").corner("5px") //角丸<br>}; <br>this.open = function(); 🎜> this.init(); <br>this.cssInit(); <br>this.shadow = function() { <br>this.event_b_show() ; <br>if (window.attachEvent) { <br>window.attachEvent('onresize', this.event_b); <br>window.attachEvent('onscroll', this.event_b); else { <br>window.addEventListener('resize', this.event_b, false); <br>window.addEventListener('scroll', this.event_b, false); <br>}; <br>this.event_b = function() { <br>var oShadow = $('#mask'); <br>if (oShadow.css("display") != "none") { <br>if ( this.event_b_show) { <br>this.event_b_show(); <br>} <br>}; <br>this.closes = function() { <br>var oShadow = $('#mask' ); <br>oShadow.css({ 'display': 'none' }); <br>$("#wai").remove(); <br>}; <br>this.event_b_show = function() { <br>var oShadow = $('#mask'); <br>oShadow.css({ 'position': 'absolute', 'display': '' , 'opacity': '0.1', 'filter': 'alpha(opacity=10)', 'background': '#000' }); <br>var sClientWidth = 親parent.document.body.offsetWidth : document .body.offsetWidth; var sClientHeight = 親.document.body.offsetHeight; : document.body.offsetHeight; 親.document.body.scrollTop; .scrollTop ) : (document.body.scrollTop document.documentElement.scrollTop); <br>oShadow.css({ 'top': '0px', 'left': '0px', 'width': sClientWidth "px", '高さ ': (sClientHeight sScrollTop) "px" });</div>