Este artículo describe el efecto de implementar el DV en la página por JS. Compártelo para su referencia, como sigue:
<style type = "text/css"> cuerpo {margen: 0px;}#div1 {display: none; Posición: Absoluto; Índice Z: 1000; Altura: 100%; Ancho: 100%; Antecedentes: #000000; Filtro: alfa (opacidad = 30);}#div2 {visualización: ninguno; Posición: Absoluto; Altura: 100%; Ancho: 100%; Top-top: 10%; z-índice: 1001;}#div3 {display: block; Posición: Absoluto; Z-Index: 999;} </style> <script type = "text/javaScript"> // Definir el objeto móvil y las coordinas móviles var rouse_obj = "none", _ x, _y; // drag del objeto function (automatic) document.onmouseMove = function () {if (mouse_obj! == "Ninguno") { document.getElementById (mouse_obj) .style.left = _x+event.x; document.getElementById (mouse_obj) .style.top = _y+event.y; event.returnValue = false; }} // deja de arrastrar la función (automáticamente) document.onmouseUp = function () {mouse_obj = "none";} // determina que la función del objeto arrastrado o es la función del objeto arrastrado m (o) {mouse_obj = o; _x = parseInt (document.getElementById (mouse_obj) .style.left) -event.x; _y = parseInt (document.getElementById (mouse_obj) .style.top) -eVent.y;} </script> <div ID = "div1"> </div> <div Id = "div2" onmousedown = "m (this.id)" estilo = "izquierda: 0px; top: 0px;"> <table cellspadding = "3" cellpacing 1 "1" "" "" "". #ff7300; posición: static; filtre: progid: dximagetransform.microsoft.dropshadow (color =#666666, offx = 4, offy = 4, positives = true) "align =" izquierda "> <tr style =" cursor: mover; "> <td> <font color ="#fffff "> calentador: </ultent> align = "right"> <input type = "button" value = "x" onClick = "document.getElementById ('div1'). style.display = 'none'; document.getElementById ('div2'). style.display = 'none';" style = "cursor: hand;"> </td> </tr> <td colspan = "2" bgcolor = "#ffffff" align = "Middle"> Bienvenido a <a href = "// www.vevb.com"> // www.vevb.com </a> </td> </tr> </pla> </divs> <biv> div3 "type3" value = "Open Layer" onClick = "document.getElementById ('div1'). style.display = 'block'; document.getElementById ('div2'). style.display = 'block';"> </div>For more information about JavaScript related content, please check out the topics of this site: "Summary of JavaScript switching effects and techniques", "Summary of JavaScript search algorithm skills", "Summary of JavaScript animation effects and techniques", "Summary of JavaScript errors and debugging techniques", "Summary of JavaScript data structures and algorithm skills", "Summary of JavaScript Algoritmos y técnicas de recorrido ", y" Resumen del uso de operaciones matemáticas de JavaScript "
Espero que este artículo sea útil para la programación de JavaScript de todos.