Some useful and necessary small script code:
Script 1: automatically play audio after entering the home page
<Embed src = "pnm: // 10.13.31.90 /~ Kayvin/mihunji. rm "hidden = true autostart = true loop = true>
Script 2: Enter the homepage and click
<Script>
Self. moveTo (0, 0)
Self. resizeTo (screen. availWidth, screen. availHeight)
</Script>
Script 3: displays the current time script
<Script language = vbscript> document. write now </script>
Script 4: displays the last modified time script.
<Script> document. write (document. lastModified) </script>
Script 5: set as homepage, add as favorites, add to channel, start outlook mail
<A style = "cursor: hand"
Onclick = "this. style. behavior =" url (# default # homepage )";
This. setHomePage ("yourURL"> set as homepage </a>
<A style = "cursor: hand"
Onclick = "window. external. AddFavorite (location. href, document. title);"> Add to favorites </a>
<A href = javascript: window. external. addChannel ("typhoon. cdf")> Add channel </a>
<A href = "youEmail"> contact me </a>
Script 6: the current time is dynamically displayed in the status bar.
<Script>
Function see (){
Window. setTimeout ("see ()", 1000 );
Today = new Date ();
Self. status = today. toString ();
}
</Script>
<Body onload = see ()>
Script 7: Close the window script
<A href = javascript: close ()> [close the window] </a>
Script 8: press the F12 key and return directly to the homepage.
<Script> function look (){
If (event. keyCode = 123) {document. location. href = http: // 10.13.31.90 /~ Kayvin /}
}
If (document. onkeydown = null)
{Document. onkeydown = look}
</Script>
Script 9: backward, refresh, and forward
Copy codeThe Code is as follows: <input type = button value = backward onclick = history. go (-1)>
<Input type = button value = Refresh onclick = history. go (-0)>
<Input type = button value = forward onclick = history. go (+ 1)>
Script 10: set the time to pop-up window, 4000 = 4 seconds, of course, you can customizeCopy codeThe Code is as follows: <script> function l (){
Window. open ("yourURL", "name", "width = 500, height = 150, border = 0 ")
}
SetTimeout ("l ()", 4000)
</Script>
The prompt message next to the second mouse, similar to the prompt effect on the page after logon to 163Tip <br/>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]