تصف هذه المقالة تأثيرات إخفاء طبقة القناع وعرضها التي يتوافق معها JS مع خصائص Firefox و IE iframe onload. شاركه للرجوع إليه ، على النحو التالي:
<٪@ page language = "java" import = "java.util.*" pageencoding = "gb2312" ٪> <٪ string path = requestContextPath () ؛ string basepath = request.getScheme () + ": //" request.getServerName () + " + request.getserport () "-// w3c // dtd html 4.01 transitional // en"> <html> <head> <base href = "<٪ = basepath ٪>"> <title> </title> <meta http-equiv = "pragma" content = http-equiv = "expires" content = "0"> <meta http-equiv = "keywords" content = "keyword1 ، keyword2 ، keyword3"> <meta http-equiv = "description" content = "this is is my page"> <! type = "text/css"> <!-#layer1 {الموضع: المطلق ؛ العرض: 896px ؛ الارتفاع: 472px ؛ z-index: 1 ؛ اليسار: 97px ؛ top: 120px ؛}#layer2 {position: absiolute ؛ width: 127px ؛ quale: 86px ؛ z-index: 2 ؛ {الموضع: المطلق ؛ العرض: 200px ؛ الارتفاع: 115px ؛ z-index: 3 ؛ اليسار: 404px ؛ الأعلى: 160px ؛} الجسم {background-image: url (lib/images/index111.jpg) ؛ margin-left: -10px ؛}. خلفية اللون:#006699 ؛}-> </style> </head> <body leftMargin = "0" topMargin = "0" marginWidth = "0" marginheight = "0" onContextMenu = "return false" ondragstart = "false" onselyctstart = "return on select. oncopy = "document.selection.empty ()" onbeforecopy = "return false" onMouseup = "document.selection.empty ()> <div id =" layer3 "> <img src =" lib/images/welcome33.gif "/> </div id =" layer1 " id = "layer1"> </frame> </viv> <div id = "layer2"> <type type = image src = "lib/images/website.jpg" id = "website_earth"/> <br> <br> <input type = image src = "lib/images/coversiator.jpg" id = "select_ass" src = "lib/images/yichang.jpg" id = "yichang"/> <br> <br> <input type = image src = "lib/lvchang.jpg" id = "gtbike"/> <</div> </body> </html> توقيت () {document.getElementById ("select_ass"). تعطيل = true ؛ document.getElementById ("select_ass"). src = "lib/images/123123.jpg" ؛ 100) ؛} window.settimeout ("timer ()" ، انتظر) ؛} دالة doupdate (num) {if (num == (wait/100)) {document.getElementById ("select_ass"). } آخر {wut = (انتظر/100) -num ؛ document.getElementById ("select_ass"). src = "lib/images/123123.jpg" ؛ }*/} // switch timer picture الأصلية () {document.getElementById ("select_ass"). upabled = false ؛ document.getElementById ("select_ass"). src = "lib/images/associator.jpg" ؛ function () {displaydiv () ؛ btmax.innerhtml = "<iframe src = earth.jsp id = layer1 onload = 'redivediv ()'> </frame>" ؛ onload = 'redivediv ()'> </frame> "؛ // JS ينشئ كائن iframe/*var newFrame = window.parent.document.createElement ("iframe") ؛ newFrame.id = "layer1" ؛ newFrame.setAttribute ("Frameborder" ، "0") ؛ newFrame.setTtribute ("Scrolli ng "،" no ") ؛ newframe.setattribute (" onload "،" rediveviv () ") ؛ newFrame.setAttribute (" src "،" client؟ name = 1 ") ؛ btmax.appendchild (newFrame) ؛*/} yichang.onclick = function () {displaydiv () ؛ btmax.innerhtml = "<iframe src = client؟ name = 2 id = layer1 onload = 'redivediv ()'> </frame>" ؛ id = layer1> </frame> "؛} // عرض طبقة القناع var mybg ؛ displaydiv = function () {mybg = document.createElement (" div ") ؛ mybg.setattribute ("id" ، "mybg") ؛ mybg.innerhtml = "<centre> تتم معالجتها ، يرجى الانتظار <img src = 'lib/images/loading.gif'> </ismg> </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" ؛ removeviv = function () {document.body.removechild (mybg) ؛ timer () ؛} </script>لمزيد من المعلومات حول المحتوى المتعلق بـ JavaScript ، يرجى مراجعة موضوعات هذا الموقع: "JavaScript تبديل المؤثرات الخاصة والتقنيات ملخص" ، "JavaScript الرسوم المتحركة المؤثرات والتقنيات ملخص" ، "JavaScript Search Graftms Marchsms" ، Technique Summary ". ملخص "،" أخطاء JavaScript وملخص لمهارات التصحيح "و" JavaScript Mathematical Operation Summary "
آمل أن تكون هذه المقالة مفيدة لبرمجة JavaScript للجميع.