Este artículo describe el simple efecto de ventana de aviso emergente de JS en la esquina inferior derecha. Compártelo para su referencia, como sigue:
< xmlns = "http://www.w3.org/1999/xhtml"> <fead> <meta http-equiv = "content-type" content = "text/html; charset = utf-8"/> <title> aa </title> <style tipo = "text/css"> * {margen: 0px; relleno: 0px; } html, cuerpo {altura: 100%; } cuerpo {font-size: 14px; Línea-aguja: 24px; } #tip {posición: absoluto; Derecha: 0px; Abajo: 0px; Altura: 0px; Ancho: 180px; borde: 1px sólido #ccccccc; Color de fondo: #EEEEEE; relleno: 1px; desbordamiento: oculto; Pantalla: ninguno; tamaño de fuente: 12px; Índice Z: 10; } #tip p {relleno: 6px; } #tip h1 {font-size: 14px; Altura: 25px; Línea de altura: 25px; Color de fondo: #0066cc; Color: #fffff; relleno: 0px 3px 0px 3px; Filtro: alfa (opacidad = 100); } #tip h1 a, #detail h1 a {float: right; Decoración de texto: ninguna; Color: #fffff; } </style> <script type = "text/javaScript"> window.onload = function () {var divtip = document.createElement ("div"); divtip.id = "tip"; divtip.innerhtml = "<h1> <a href = 'javaScript: void (0)' onClick = 'start ()'> cerrar </a> título </h1> <p> <a href = 'javascript: void (0)' onclick = 'showwin ()'> content </a> </p>"; divtip.style.height = '0px'; divtip.style.bottom = '0px'; divtip.style.position = 'fijo'; document.body.appendChild (divtip); } mango var; función start (count) {var obj = document.getElementById ("tip"); if (parseInt (obj.style.height) == 0) {obj.style.display = "bloque"; handle = setInterval ("Changeh ('Up')", 20); } else {handle = setInterval ("ChangeH ('Down')", 20)}} function ChangeH (str) {var obj = document.all? document.all ["tip"]: document.getElementById ("tip"); //docuemnt.all ??????? if (str == "up") {if (parseInt (obj.style.height)> 100) ClearInterval (Handle); else obj.style.height = (parseInt (obj.style.height) + 8) .ToString () + "px"; } if (str == "down") {if (parseInt (obj.style.height) <8) {clearInterval (handle); obj.style.display = "Ninguno"; } else obj.style.height = (parseInt (obj.style.height) - 8) .ToString () + "Px"; }} función showwin () {//document.getelementsbytagname("html")ficfont>.style.overflow = "Hidden"; comenzar(); } </script> </head> <body> <a href = "#" onClick = "start ()"> haga clic en </a> </body> </html>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.