この記事では、JSがFirefoxとIFRAME Onloadプロパティと互換性のあるものを実装するマスク層の隠しおよび表示効果について説明します。次のように、参照のために共有してください。
<%@ page Language = "Java" Import = "Java.util。*" PageEncoding = "GB2312"%> <%String Path = request.getContextPath(); string basepath = request.getscheme() + "://" + request.getServername() + ":" + requestserverport( " - // w3c // dtd html 4.01 transitional // en"> <html> <head> <base href = "<%= basepath%>"> <title> </title> <meta http-equiv = "pragma" content = "no-cache"> <mettp-equiv = " http-equiv = "expires" content = "0"> <meta http-equiv = "keywords" content = "keyword1、keyword2、keyword3"> <meta http-equiv = "descontion" content = "これは私のページ"> <! - <link rel = "styleSheet" type = "href =" style. type = "text/css"> <! - #layer1 {position:aspolute; width:896px; height:472px; z-index:1;左:97px; top:120px;} layer2 {位置:絶対;幅:127px; {位置:絶対;幅:200px;高さ:115px; z-index:3;左:404px; top:160px;} body {background-image:url(lib/images/index111.jpg);マージン左:-10px;}。入力#808000;バックグラウンドカラー:#006699;} - > </style> </head> <body leftmargin = "0" topmargin = "0" "" "" "" oncontextmenu = "oncontextmenu =" return false "ondragstart =" return fals oncopy = "document.selection.empty()" onbeforecopy = "return false" onmouseup = "document.select.empty()"> <div id = "lay3"> <img src = "lib/emages 33.gif"/> </div> <div id = "layer1" id = "layer1"> </iframe> </div> <div id = "layer2"> <入力タイプ=画像src = "lib/images/website.jpg" id = "website_earth"/> <br> <br> <入力タイプ=イメージsrc = "lib/images/associonator.jpg" id = "/> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> src = "lib/images/yichang.jpg" id = "yichang"/> <br> <br> <入力タイプ=画像src = "lib/images/lvchang.jpg" gtbike "/> <</div> </body> </html> <script = 20; var wait*100;////////// Timeing(){document.getElementByid( "select_ass")。disabled = true; document.getElementById( "select_ass")。src = "lib/yights/123123.jpg"; //タイミングスイッチング画像/ * 100);} window.settimeout( "timer()"、wait);} function doupdate(num){if(num ==(wait/100)){document.getElementById( "select_ass")。src = "lib/mages/associator.jpg"; } else {wut =(wait/100)-num; document.getElementById( "select_ass")。src = "lib/images/123123.jpg"; }*/} //元の画像関数Timer(){document.getElementById( "select_ass")。disabled = false; document.getElementById( "select_ass")。src = "lib/yages/associator.jpg";} var btmax = document.getelementbyid( "layer1") function(){displaydiv(); btmax.innerhtml = "<iframe src = earth.jsp id = layer1 onload = 'remaveviv()'> </iframe>";} select_ass.onclick = function(){displaydiv(); btmax.innerhtml = "<iframe1 onload = 'removediv()'> </iframe> "; // js iframe object/*var newFrame = window.parent.document.createelement( "iframe"); newFrame.id = "layer1"; newFrame.setTribute( "frameborder"、 "0"); newFrame.setattribute( "Scrolli ng "、" no "); newFrame.setAttribute(" onload "、" removediv() "); newFrame.setattribute(" src "、" client?name?name = 1 "); btmax.appendchild(newFrame);*/} yichang.onclick = function(){displaydiv(); btmax.innerhtml = "<iframe src = client?name = 2 id = layer1 onload = 'removediv()'> </iframe>";} gtbike.onclick = function(){){){btmax.innerhtml = " id = layer1> </iframe> ";} //マスクレイヤーディスプレイvar mybg; displaydiv = function(){mybg = document.createelment(" div "); mybg.setattribute( "id"、 "mybg"); mybg.innerhtml = "<center>が処理されています。 mybg.style.width = "100%"; mybg.style.position = "absolute"; //絶対位置表示mybg.style.top = "260"; mybg.style.left = "0"; mybg.style.zindex = "100"; // z-axis position mybg.style.opacity = "0.8"; // transparency mybg.style.filter = "alpha(ofacity = 80)"; //フィルターは透明性ドキュメントを表示します。 removediv = function(){document.body.removechild(mybg); timer();} </script>JavaScript関連のコンテンツの詳細については、このサイトのトピックをご覧ください:「JavaScriptのスイッチングスペシャルエフェクトとテクニックの要約」、「JavaScript Animation Special Effectse and Techniques Summary」、「JavaScript Search Algorithm Skillary」、「JavaScriptデータ構造とアルゴリズムスキルの概要」、「JavaScript Traversmmadm and "JavaScript Traversmの操作」" Javascript raversm conderiques formerispas "Javascript conderiques" Javasprica概要 "、" JavaScriptエラーとデバッグスキルの要約]および「JavaScript数学操作の使用概要」
この記事がみんなのJavaScriptプログラミングに役立つことを願っています。