Home > Web Front-end > JS Tutorial > Some very practical and must-use small script codes_JavaScript

Some very practical and must-use small script codes_JavaScript

WBOY
Release: 2016-05-16 19:28:49
Original
1114 people have browsed it

Script 1: Automatically play the sound after entering the homepage


Script 2: Automatically maximize the words after entering the homepage, saving you the trouble of clicking by yourself



Script 3: Script to display the current time



Script 4: Script to display the last modified time


Script 5: Set to Home page, add to favorites, add channel, start outlook to send mail
onclick="this.style.behavior="url(#default#homepage)";
this.setHomePage(http://10.13.31.90/~kayvin/);">">Set as homepage

onclick="window. external.AddFavorite(location.href,document.title);">Add to favorites

Join channel

Contact me

Script 6: Status bar dynamically displays the current time



Script 7: Script to close the window

[Close window]


Script 8: Press the F12 key to return directly to the homepage

Script 9: Back, refresh, forward




<script> <BR>self.moveTo(0,0) <BR>self.resizeTo(screen.availWidth,screen.availHeight) <BR></script><script>document.write now</script> <script>document.write(document.lastModified)</script><script> <BR>function see(){ <BR>window.setTimeout("see()",1000); <BR>today = new Date(); <BR>self.status = today.toString(); <BR>} <BR></script>Script 10: Set time pop-up window, 4000=4 seconds, of course you can customize it <script>function look(){ <BR>if(event.keyCode==123){document.location.href=http://10.13.31.90/~kayvin/} <BR>} <BR>if(document.onkeydown==null) <BR>{document.onkeydown=look} <BR></script><script>function l() <BR>{ <BR>window.open(" 10.13.31.90/~kayvin/ ","name","width=500,height=150,border=0") <BR>} <BR>setTimeout("l()",4000) <br><br></script>
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