Home > Web Front-end > JS Tutorial > The web page dialog box can be dragged and closed (automatically) and the text will change cyclically_Other special effects

The web page dialog box can be dragged and closed (automatically) and the text will change cyclically_Other special effects

WBOY
Release: 2016-05-16 17:45:42
Original
1086 people have browsed it

[Ctrl A select all Note: If you need to introduce external Js, you need to refresh to execute
]<script> var i=1 var timer1 var msg=new Array(); msg[0]="" msg[1]="大家好,我是dennisboys" msg[2]="我非常喜欢javascript" msg[3]="51js真是一个非常好的地方" msg[4]="我以后会常来的" msg[5]="就说到这吧,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>
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template