تصف هذه المقالة تأثير نافذة المطالبة المنبثقة البسيطة لـ JS في الزاوية اليمنى السفلية. شاركه للرجوع إليه ، على النحو التالي:
<! doctype html public "-// w3c // dtd xhtml 1.0 transitional // en" xmlns = "http://www.w3.org/1999/xhtml"> <head> <meta http-equiv = "content-type" content = "text/html ؛ charset = utf-8"/> <title> aa </title> <tort type/css الحشو: 0px ؛ } html ، الجسم {الارتفاع: 100 ٪ ؛ } body {font-size: 14px ؛ Line-Leight: 24px ؛ } #tip {الموضع: absolute ؛ اليمين: 0px ؛ أسفل: 0px ؛ الارتفاع: 0px ؛ العرض: 180 بكسل ؛ الحدود: 1px الصلبة #CCCCCC ؛ خلفية اللون: #EEEEE ؛ الحشو: 1px ؛ الفائض: مخفي. العرض: لا شيء ؛ حجم الخط: 12 بكسل ؛ Z-Index: 10 ؛ } #tip p {padding: 6px ؛ } #tip h1 {font-size: 14px ؛ الارتفاع: 25 بكسل ؛ رفع الخط: 25 بكسل ؛ خلفية اللون: #0066cc ؛ اللون: #fffff ؛ Padding: 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 ()'> إغلاق </a> العنوان </h1> <p> <a href = 'javaScript: void (0)' OnClick = 'showwin ()'> content </a> divtip.style.height = '0px' ؛ divtip.style.bottom = '0px' ؛ divtip.style.position = 'ثابت' ؛ document.body.appendChild (DivTip) ؛ } var handle ؛ الوظيفة start (count) {var obj = document.getElementById ("tip") ؛ if (parseint (obj.style.height) == 0) {obj.style.display = "block" ؛ handle = setInterval ("changeh ('Up')" ، 20) ؛ } آخر {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 = "none" ؛ } else obj.style.height = (parseint (obj.style.height) - 8) .ToString () + "px" ؛ }} وظيفة showwin () {//document.getElementSbyTagName("html") budap00/style.overflow = "hidden" ؛ يبدأ()؛ } </script> </head> <body> <a href = "#" onClick = "start ()"> انقر فوق </a> </body> </html>لمزيد من المعلومات حول المحتوى المتعلق بـ javaScript ، يرجى مراجعة موضوعات هذا الموقع: "ملخص لتأثيرات وتقنيات تبديل JavaScript" ، "ملخص لمهارات خوارزمية بحث JavaScript" ، "ملخص لتأثيرات الرسوم المتحركة JavaScript و Techniques و" ملخص ". خوارزميات وتقنيات JavaScript Traversal "، و" ملخص استخدام العمليات الرياضية JavaScript "
آمل أن تكون هذه المقالة مفيدة لبرمجة JavaScript للجميع.