В этой статье описывается простой всплывающий эффект окна JS в правом нижнем углу. Поделитесь этим для вашей ссылки, следующим образом:
<! Doctype html public "-// w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <meta http-equiv = "content-type" content = "text/html; charset = utf-8"/> <title> aa </title> <стиль типа = "css/css"> * {margin: 0px; Заполнение: 0px; } html, тело {высота: 100%; } body {font-size: 14px; высота линии: 24px; } #tip {position: Absolute; Справа: 0px; Внизу: 0px; высота: 0px; Ширина: 180px; Граница: 1px solid #cccccc; фоновый цвет: #eeeeeee; Заполнение: 1px; переполнение: скрыто; дисплей: нет; размер шрифта: 12px; z-index: 10; } #tip p {padding: 6px; } #tip H1 {font-size: 14px; Высота: 25px; высота линии: 25px; фоновый цвет: #0066CC; Цвет: #fffff; Подкладка: 0px 3px 0px 3px; Фильтр: альфа (непрозрачность = 100); } #TIP H1 A, #Detail H1 A {float: right; Текстовое декорация: нет; Цвет: #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 ()'> close </a> title </h1> <p> <a href = 'javascript: void (0)' Onclick = 'showwin ()'> content </a> </p>"; divtip.style.height = '0px'; divtip.style.bottom = '0px'; divtip.style.position = 'fixed'; document.body.appendchild (divtip); } var harder; function start (count) {var obj = document.getElementbyId ("tip"); if (parseint (obj.style.height) == 0) {obj.style.display = "block"; handle = setInterval ("changeh ('up')", 20); } else {harder = 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 = "none"; } else obj.style.height = (parseint (obj.style.height) - 8) .toString () + "px"; }} function showwin () {//document.getelementsbytagname("html") nembon.style.overflow = "hidden"; начинать(); } </script> </head> <body> <a href = "#" onclick = "start ()"> Нажмите </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 »и« Сводка использования математических операций JavaScript ».
Я надеюсь, что эта статья будет полезна для каждого программирования JavaScript.