(1) set as Homepage
<A href = http://www.thwd.net
Onmouseover = This. style. Behavior = "URL (# default # homepage )";
This. setHomePage ("http://www.thwd.net/";);> set to home </a>
(2) Add to favorites
<A href = javascript: window. External. AddFavorite ("http://www.jzzy.com";, "Site Resources")> Add to favorites site </a>
(3) display scroll information in the window status area
(1) Add in the bodyCode
<Script
Language = "JavaScript">
VaR MSG = "welcome to the website resources network. Here you will have some gains! ";
VaR I = 1
Function scroll ()
{
Mess = msg. substring (I, MSG. Length) +"
"+ Msg. substring (0, I)
Window. Status = mess
I ++;
If (I> = msg. length)
I = 1; // set non-stop scrolling
SetTimeout ("scroll ()", 200); // you can specify the scroll speed.
}
</SCRIPT>
(2) In the Body Tag:
<Body onload = "scroll ()">
(4) Add the current time to the page
<Script language = "JavaScript">
TDY = new date ();
Document. Write ("current time:", TDY. gethours ());
Document. Write (":", TDY. getminutes ());
Document. Write (":", TDY. getseconds ());
</SCRIPT>
(5) forward and backward buttons
<Input type = "button" value = "<-"
Onclick = "history. Go (-1)">
<Input type = "button" value = "->"
Onclick = "history. Go (1)">
(6) Date of last modification to the page
<Script language = "JavaScript">
Document. Write ("Last edit date of this page :");
Document. Write (document. lastmodified)
</SCRIPT>
(7) forward and backward buttons
<Font onclick = "history. Go (-1)"> previous page </font>
<Font onclick = "history. Go (-2)"> previous two pages </font>
<Font
Onclick = "history. Go (-3)"> first three pages </font>
<Font
Onclick = "history. Go (1)"> next page </font>
<Font
Onclick = "history. Go (2)"> last two pages </font>
<Font
Onclick = "history. Go (3)"> last three pages </font>
You can also set back and move forward multiple steps.
(8), mouse events
onmouseover = "alert (" Write to me "); return true "> mailbox
place the cursor to display the Warning Information
(9) Obtain browser attributes
navigator. appcodename = undefinednavigator. appname = Microsoft Internet
assumernavigator. appversion = 4.0 (compatible; MSIE 5.0; Windows 98;
digext) navigator. appagent = undefined
(10) print the entire page
onclick = "javascript: window. print () "> Print this page
(11) view Source Code
type = "button" name = "View" value = "view source code on this page"
onclick = "window. location = "view-source:" + window. locati On. href "
class =" pt9 ">
(12). Refresh the page
onclick =" history. go (0) "> refresh this page
(13), background color conversion
type = "button" value = "background color conversion" onclick = "bgbutton () ">
(14th) display Information on title