1. display different greetings in different time periods
<Script Language = "JavaScript">
<! --
Var text = ""; day = new Date (); time = day. getHours ();
If (time> = 0) & (time <7 ))
Text = "night owl, pay attention to your health! "
If (time> = 7) & (time <12 ))
Text = "Today's sunshine is brilliant. What about your friend? "
If (time> = 12) & (time <14 ))
Text = "lunch break time. You need to stay asleep! "
If (time> = 14) & (time <18 ))
Text = "Have a good afternoon! "
If (time> = 18) & (time <= 22 ))
Text = "You're coming again. Don't talk to MM too long! "
If (time> = 22) & (time <24 ))
Text = "you should have taken a rest! "
Document. write (text)
// --->
</Script>
2. reflection effect in Water
<Script language = "JavaScript">
Function f1 ()
{
SetInterval ("mdiv.filters.wav e. phase +=10", 100 );
}
If (document. all)
{
Document. write (Style = "filter: wave (strength = 3, freq = 3, phase = 0, lightstrength = 30) blur () flipv ()">)
Window. onload = f1
}
</Script>
3. a window that gradually grows
<Script Language = "JavaScript">
<! --
Var Windowsheight = 100
Var windowsswidth = 100
Var numx = 5
Function openwindow (thelocation ){
Temploc = thelocation
If
(! (Window. resizeTo & document. all )&&! (Window. resizeTo & document. getElementById ))
{
Window. open (thelocation)
Return
}
Windowsize = window. open ("", "", "scrollbars ")
Windowsize. moveTo (0, 0)
Windowsize. resizeTo (100,100)
Tenumxt ()
}
Function tenumxt (){
If (Windowsheight> = screen. availHeight-3)
Numx = 0
Windowsize. resizeBy (5, numx)
Windowsheight + = 5
Windowswidth + = 5
If (Windowswidth> = screen. width-5)
{
Windowsize. location = temploc
Windowsheight = 100
Windowswidth = 100
Numx = 5
Return
}
SetTimeout ("tenumxt ()", 50)
}
// -->
</Script>
<P> <a href = "javascript: openwindow (http://www.ccjol.com)"> enter </a>
4. Change the IE icon in the IE Address Bar
We need to first create a 16*16 icon (icon file) and save it as index. ico. Upload the icon file to the root directory and add the following code between the <Link REL = "Shortcut Icon" href = "index. ico">