A time-based clock function show ()
{If (! Document. Layers &&! Document. All)
Return
VaR digital = new date ()
VaR year = digital. getyear ()
VaR month = digital. getmonth () + 1
VaR day = digital. getdate ()
VaR hours = digital. gethours ()
VaR minutes = digital. getminutes ()
VaR seconds = digital. getseconds ()
VaR DN = "am"
If (hours> 12) {DN = "PM"
Hours = hours-12
} If (hours = 0)
Hours = 12
If (minutes <= 9)
Minutes = "0" + minutes
If (seconds <= 9)
Seconds = "0" + seconds
// Change font size here to your desire
Myclock = "<font color = blue>" + year + "-" + month + "-" + day + "+ hours +": "+ minutes + ": "+ seconds +" "+ DN +" </font> ";
If (document. layers ){
Document.layers.liveclock.doc ument. Write (myclock)
Document.layers.liveclock.doc ument. Close ()
} Else if (document. All)
Jnkc. innerhtml = myclock
SetTimeout ("show ()", 1000)
}
// -->
Window. onload = show;
Click <SCRIPT type = "text/JavaScript">
Function submitkeyclick (button)
{
If (event. keycode = 13)
{
Event. keycode = 9;
Event. returnvalue = false;
Document. All [button]. Click ();
}
}
</SCRIPT>
During the call, you can write it like this (after the user loses the password, press Enter) me.txt pass. Attributes. Add ("onkeydown", "submitkeyclick ('button1 ');")
Button1 is the button to press enter to execute
Maximize page initial time
<Script language = "JavaScript">
Self. moveTo (0, 0)
Self. resizeTo (screen. availwidth, screen. availheight)
</SCRIPT>
The default value is displayed in the text box. After clicking the button, the value becomes null. <SCRIPT type = "text/JavaScript">
Function cleartxt (textboxid)
{
If (textboxid = "textbox1" & document. All (textboxid). value = "Please input keyword ")
Document. All (textboxid). value = "";
}
</SCRIPT>
Write me. textbox1.attributes. Add ("onclick", "cleartxt ('textbox1');") in the background ');")