Web page dialog box can be dragged, closed (automatic) text cycle change _ other effects

Source: Internet
Author: User
The webpage WEB dialog box implemented by Js allows you to drag the mouse to change the location. Similar to the daily prompt displayed when some software is running for the first time, there is a circular change in the text, and the time is automatically closed, A powerful web dialog box. If you are interested, please refer to it.

<Title> Web page dialog box </title> <style> span, table {font-size: 10pt; margin: 0pt} </style> <body onmousemove = move1 ()> <table id = table1 bordercolorlight = # d8d0c8 bordercolordark = #808080 border = 2 style = display: block; position: absolute; width: 400; height: 257; left: 100; top: 50; background-color: # c0c0c0;> <tr> <td style = vertical-align: top> Tip of the day -- Web page dialog box X <B> help </B> 1/5 <B> do you know... </B> hello, my name is dennisboys <input id = check1 type = checkbox checked onclick = checkone () onfocus = this. blur ()> automatic post turning <input type = button value = "next post" style = background-color: # c0c0c0 onclick = nextmsg () onfocus = this. blur ()> <input type = button value = "close" style = background-color: # c0c0c0 onfocus = this. blur () onclick = closewin ()> </td> </tr> </table> </body> script var I = 1 var timer1 var msg = new Array (); msg [0] = "" msg [1] = "hello, everyone, i'm dennisboys "msg [2] =" I like javascript very much "msg [3] =" 51js is a really good place "msg [4] =" I will always come" msg [5] = "Let's talk about this, 886 "function nextmsg () {num. innerText = "" + I + "/5" message. innerText = msg [I] I ++ if (I> 5) I = 1 clearTimeout (timer1) check1.checked = false} function checkone () {if (check1.checked = true) {num. innerText = "" + I + "/5" message. innerText = msg [I] I ++ if (I> 5) I = 1 timer1 = setTimeout ("checkone ()", 2000)} else {clearTimeout (timer1 )}} checkone () var count = 0 function down1 () {cleft = table1.style. pixelLeft ctop = table1.style. pixelTop cx = event. clientX cy = event. clientY count = 1} function move1 () {if (count = 1) {table1.style. pixelLeft = cleft + event. clientX-cx table1.style. pixelTop = ctop + event. clientY-cy} function up1 () {count = 0} function closewin () {table1.style. display = 'none'} script
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.