Este artículo describe los efectos de ocultación y visualización de la capa de máscara que JS implementa compatibles con Firefox e IE Iframe Onload Propiedades. Compártelo para su referencia, como sigue:
<%@ page lenguaje = "java" import = "java.util.*" PageEncoding = "gb2312"%> <%string path = request.getContextPath (); string basepath = request.getScheme () + ": //" + request.getServerNnEn "-// w3c // dtd html 4.01 transitional // en"> <html> <head> <base href = "<%= basepath%>"> <title> </title> <meta http-equiv = "pragma" content = "no-cache"> <meta http-equiv = "cache-control" contento "no cogla <sis" "no-cache" http-equiv = "expires" content = "0"> <meta http-eEquiv = "Keywords" content = "Keyword1, Keyword2, Keyword3"> <meta http-oquiv = "Descripción" Content = "Esta es mi página"> <!-<Link Rel = "Stylesheet" type = "Text/css" href = "Styles.csss" type = "text/css"> <!-#layer1 {posición: absoluto; ancho: 896px; altura: 472px; z-odex: 1; izquierda: 97px; top: 120px;}#layer2 {posición: absoluto; ancho: 127px; altura: 86px; z-index: 2; izquierda: 1159px; top: 240px; {posición: absoluto; ancho: 200px; altura: 115px; z-index: 3; izquierda: 404px; arriba: 160px;} cuerpo {background-image: url (lib/imágenes/index111.jpg); margen-last: -10px;}. input_image {border: 0px sólido #808080; Color de fondo:#006699;}-> </style> </head> <body leftMargin = "0" topMargin = "0" marginwidth = "0" marginHeight = "0" encontextmenu = "return false" onDraGStart = "return false" onSelectStart = "return False" onselect = "Document.selection.Empty ()") ")" onCopy = "document.selection.empty ()" onbeforRecopy = "return false" onMouseUp = "document.selection.empty ()"> <div id = "Layer3"> <img src = "lib/images/welcome33.gif"/> </div> <div ID = "Layer1"> <iframe src = "Earth.jsp" id = "Layer1"> </iframe> </iv> <div id = "Layer2"> <Input type = image src = "lib/images/witebilt.jpg" id = "sitio web_earth"/> <br> <br> <input type = image src = "lib/images/asociator.jpg" id = "select_ass"/> <br> <br> <bing type de entrada = "Lib/image/asociator.jpg" Id = "Select_ass"/> <br> <br> <bry de input src = "Lib/Image/Associator.jpg" Id = "Select_ass"/> <br> <br> <BryMe Input Src = "Lib/Image/Associator.jpg" Id = "Select_ass"/> <br> <br> <BryMe Input type src = "lib/images/yichang.jpg" id = "yichang"/> <br> <br> <input type = image src = "lib/images/lvchang.jpg" id = "gtbike"/> <</div> </body> </html> <script> var secs = 20; var = secs*100; // Timing () {document.getElementById ("select_ass"). Disabled = true; document.getElementById ("select_ass"). src = "lib/images/123123.jpg"; // Timeed Switching Image 100);} Window.setTimeOut ("Timer ()", Wait);} function DoupDate (num) {if (num == (espera/100)) {document.getElementById ("select_ass"). Src = "lib/images/asociator.jpg"; } else {wut = (espera/100) -num; document.getElementById ("select_ass"). src = "lib/imágenes/123123.jpg"; }*/} // Switch Función de imagen original Timer () {document.getElementById ("select_ass"). Disabled = false; document.getElementById ("select_ass"). Src = "lib/images/asociator.jpg";} var btmax = document.getEntyById ("LACE1"); Sitio web_earth.onclick = " function () {displayDiv (); btmax.innerhtml = "<iframe src = ANTH.JSP id = LAYER1 onload = 'removeediv ()'> </iframe>";} select_ass.oncclick = function () {displayDiv (); Timing (); btmax.innerhtml = "<ifRame srame srcc onload = 'removediv ()'> </iframe> "; // js crea un objeto iframe/*var NewFrame = Window.Parent.Document.CreateElement ("iframe"); newFrame.id = "Layer1"; newFrame.SetAttribute ("FrameBorder", "0"); NewFrame.SetAttribute ("Scrolli ng "," no "); newFrame.SetAttribute (" OnLoad "," eliminado () "); newFrame.SetAttribute (" src "," cliente? name = 1 "); btmax.appendChild (newframe);*/} yichang.onclick = function () {displayDiv (); btmax.innerHtml = "<iframe src = client? name = 2 id = Layer1 onload id = layer1> </iframe> ";} // Mask Layer Display Var myBG; displayDiv = function () {myBG = document.createElement (" div "); mybg.setAttribute ("id", "mybg"); mybg.innerhtml = "<Center> se está procesando, espere <img src = 'lib/images/loading.gif'> </ img> </center>"; mybg.style.width = "100%"; mybg.style.position = "Absolute"; // Absolute Position Display mybg.style.top = "260"; mybg.style.left = "0"; mybg.style.zindex = "100"; // Z-AXIS Position mybg.style.opacity = "0.8"; // transparencia mybg.style.filter = "alfa (opacidad = 80)"; // Filtro muestra transparencia documento.body.appendchild (mybg);} // mascarilla removal removediv = function () {document.body.removechild (mybg); timer ();} </script>Para obtener más información sobre el contenido relacionado con JavaScript, consulte los temas de este sitio: "JavaScript cambiando efectos especiales y resumen de técnicas", "JavaScript Animation Efectos especiales y técnicas de técnicas Resumen", "Resumen de habilidades de algoritmo de búsqueda de JavaScript", "Summario de la Operación de Habilidades JavaScript de Javascript" ",", ",", ",", algoritmo de las habilidades de javascripción de JavaScript y técnicas, "", "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "", "", "", "", "", "", Resumen "," Resumen de habilidades de errores y depuración de JavaScript "y" JavaScript Mathematical Operation Usage Resumen "
Espero que este artículo sea útil para la programación de JavaScript de todos.