Este artigo descreve o efeito de janela prompt pop-up simples do JS no canto inferior direito. Compartilhe -o para sua referência, como segue:
<! xmlns = "http://www.w3.org/1999/xhtml"> <head> <meta http-equiv = "content-type" content = "text/html; charset = utf-8"/> <title> aa </title> <estilo type = "text/cs/cs" preenchimento: 0px; } html, corpo {altura: 100%; } corpo {font-size: 14px; altura da linha: 24px; } #tip {posição: absoluto; Direita: 0px; Inferior: 0px; Altura: 0px; Largura: 180px; borda: 1px sólido #cccccc; Background-Color: #eeeeee; preenchimento: 1px; estouro: oculto; Exibir: Nenhum; tamanho de fonte: 12px; Z-Index: 10; } #tip p {preenchimento: 6px; } #tip h1 {font-size: 14px; Altura: 25px; altura de linha: 25px; Background-Color: #0066cc; Cor: #fffff; preenchimento: 0px 3px 0px 3px; filtro: alfa (opacidade = 100); } #TIP H1 A, #Detail H1 A {float: Right; Decoração de texto: Nenhum; Cor: #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 ()'> feche </a> título </h1> <p> <a href = 'javascript: void (0)' ondclick = 'showwin ()' '> conteúdo </aa> divtip.style.Height = '0px'; divtip.style.bottom = '0px'; divtip.style.Position = 'Fixed'; document.body.appendChild (divtip); } alça var; função start (contagem) {var obj = document.getElementById ("tip"); if (parseint (obj.style.height) == 0) {obj.style.display = "block"; Handle = setInterval ("ChangeH ('Up')", 20); } else {handle = setInterval ("ChangeH ('Down')", 20)}} função alteração (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 = "nenhum"; } else obj.style.Height = (parseint (obj.style.height) - 8) .toString () + "px"; }} função showwin () {//document.getElementsByTagname("html")[0 ].style.overflow = "Hidden"; começar(); } </script> </ad Head> <body> <a href = "#" onclick = "start ()"> clique </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 e Técnicas de Traversal "e" Resumo do Uso do Javascript Mathematic Operations "
Espero que este artigo seja útil para a programação JavaScript de todos.