JavaScript dành cho các bạn học thiết kế Web
Thay đổi trang: < 123 > >> | Trang 3 của 4 trang, bài viết từ 31 đến 45 trên tổng số 58 bài trong đề mục
CDDLT 27.10.2005 19:16:08 (permalink)
Liên kết bằng nút radio

<script language="JavaScript">
<!-- Activate Cloaking Device

var recnum="";


// Used to initialize arrays.


function initArray()


{


this.length = initArray.arguments.length;


for (var i = 0; i < this.length; i++)


{ this = initArray.arguments; }


}


// Creating arrays.


var rcrd = new initArray();


var address = new initArray();


rcrd[1] = "Home Page\ r\ nThe home page of this site.";


address[1] = "index3.htm";





rcrd[2] = "Contents\ r\ nA listing of the contents of this site.";


address[2] = "contents.htm";





rcrd[3] = "Navigation Aids\ r\ nExamples of various ways to make navigation of your site easier.";


address[3] = "navigationaids.htm";





rcrd[4] = "A Dropdown List\ r\ nAn example of a dropdown list for site navigation.";


address[4] = "dropdown.htm";





// Called by onClick for each radio button - determines & displays message and URL.


function dataBase(leapto)


{


for (var i = 0; i < 4; i++)


{


if (leapto.buttons.checked)


{ recnum = leapto.buttons.value; }


}


if ( (rcrd[recnum] != null) && (rcrd[recnum] != "") )


{ document.leapto.display.value = rcrd[recnum]+"\ r\ n\ r\ n"+address[recnum]; }


}





// Called by Lets Go button - loads pre-selected page.


function leapTo()


{


if ( (address[recnum] != null) && (address[recnum] != "") && (recnum != "") )


window.location= address[recnum];


else


alert("\ nYou must first select a radio button.");


}

// Deactivate Cloaking -->
</script>
<body bgcolor="#ffe4c4" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<center><form name="leapto">
<table border=3><tr>
<td align="center" bgcolor=000080>
<input type="radio" name="buttons" value="1" onclick="dataBase(this.form)">
<font color=00ffff><b>Home Page</b></font></td>
<td align="center" bgcolor=ff0000>
<input type="radio" name="buttons" value="2" onclick="dataBase(this.form)">
<font color=000000><b>Contents</b></font></td>
<td align="center" bgcolor=c0c0c0>
<input type="radio" name="buttons" value="3" onclick="dataBase(this.form)">
<font color=800000><b>Navigation Aids</b></font></td>
<td align="center" bgcolor=008080>
<input type="radio" name="buttons" value="4" onclick="dataBase(this.form)">
<font color=ffff00><b>A Dropdown List</b></font></td></tr>
</table>
<br><br>
<table border=0><tr>
<td align="center" width=350>
<textarea name="display" rows=6 cols=25 wrap=yes></textarea></td>
<td align="center" width=150>
<input type="button" value="Let's Go!" onclick="leapTo()"></td></tr>
</table>
</form>
</center>

#31
    CDDLT 27.10.2005 19:16:59 (permalink)
    Bảng màu để thay đổi nền trang web

    <script language="JavaScript">

    lck=0;

    function r(hval)
    {
    if ( lck == 0 )
    {
    document.bgColor=hval;
    document.f.c.value=hval;
    }
    }

    function l()
    {
    if (lck == 0)
    {
    lck = 1;

    }
    else
    {
    lck = 0;

    }
    }
    </script>
    <center><table border=0>
    <tr>
    <td bgcolor="#000000"><a href="JavaScript:l()"
    onmouseover="r('#000000'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#000033"><a href="JavaScript:l()"
    onmouseover="r('#000033'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#000066"><a href="JavaScript:l()"
    onmouseover="r('#000066'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#000099"><a href="JavaScript:l()"
    onmouseover="r('#000099'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#0000cc"><a href="JavaScript:l()"
    onmouseover="r('#0000cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#0000ff"><a href="JavaScript:l()"
    onmouseover="r('#0000ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#006600"><a href="JavaScript:l()"
    onmouseover="r('#006600'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#006633"><a href="JavaScript:l()"
    onmouseover="r('#006633'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#006666"><a href="JavaScript:l()"
    onmouseover="r('#006666'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#006699"><a href="JavaScript:l()"
    onmouseover="r('#006699'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#0066cc"><a href="JavaScript:l()"
    onmouseover="r('#0066cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#0066ff"><a href="JavaScript:l()"
    onmouseover="r('#0066ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#00cc00"><a href="JavaScript:l()"
    onmouseover="r('#00cc00'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#00cc33"><a href="JavaScript:l()"
    onmouseover="r('#00cc33'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#00cc66"><a href="JavaScript:l()"
    onmouseover="r('#00cc66'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#00cc99"><a href="JavaScript:l()"
    onmouseover="r('#00cc99'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#00cccc"><a href="JavaScript:l()"
    onmouseover="r('#00cccc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#00ccff"><a href="JavaScript:l()"
    onmouseover="r('#00ccff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    </tr>
    <tr>
    <td bgcolor="#003300"><a href="JavaScript:l()"
    onmouseover="r('#003300'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#003333"><a href="JavaScript:l()"
    onmouseover="r('#003333'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#003366"><a href="JavaScript:l()"
    onmouseover="r('#003366'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#003399"><a href="JavaScript:l()"
    onmouseover="r('#003399'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#0033cc"><a href="JavaScript:l()"
    onmouseover="r('#0033cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#0033ff"><a href="JavaScript:l()"
    onmouseover="r('#0033ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#009900"><a href="JavaScript:l()"
    onmouseover="r('#009900'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#009933"><a href="JavaScript:l()"
    onmouseover="r('#009933'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#009966"><a href="JavaScript:l()"
    onmouseover="r('#009966'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#009999"><a href="JavaScript:l()"
    onmouseover="r('#009999'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#0099cc"><a href="JavaScript:l()"
    onmouseover="r('#0099cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#0099ff"><a href="JavaScript:l()"
    onmouseover="r('#0099ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#00ff00"><a href="JavaScript:l()"
    onmouseover="r('#00ff00'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#00ff33"><a href="JavaScript:l()"
    onmouseover="r('#00ff33'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#00ff66"><a href="JavaScript:l()"
    onmouseover="r('#00ff66'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#00ff99"><a href="JavaScript:l()"
    onmouseover="r('#00ff99'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#00ffcc"><a href="JavaScript:l()"
    onmouseover="r('#00ffcc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#00ffff"><a href="JavaScript:l()"
    onmouseover="r('#00ffff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    </tr>
    <tr>
    <td bgcolor="#330000"><a href="JavaScript:l()"
    onmouseover="r('#330000'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#330033"><a href="JavaScript:l()"
    onmouseover="r('#330033'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#330066"><a href="JavaScript:l()"
    onmouseover="r('#330066'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#330099"><a href="JavaScript:l()"
    onmouseover="r('#330099'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#3300cc"><a href="JavaScript:l()"
    onmouseover="r('#3300cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#3300ff"><a href="JavaScript:l()"
    onmouseover="r('#3300ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#336600"><a href="JavaScript:l()"
    onmouseover="r('#336600'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#336633"><a href="JavaScript:l()"
    onmouseover="r('#336633'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#336666"><a href="JavaScript:l()"
    onmouseover="r('#336666'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#336699"><a href="JavaScript:l()"
    onmouseover="r('#336699'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#3366cc"><a href="JavaScript:l()"
    onmouseover="r('#3366cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#3366ff"><a href="JavaScript:l()"
    onmouseover="r('#3366ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#33cc00"><a href="JavaScript:l()"
    onmouseover="r('#33cc00'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#33cc33"><a href="JavaScript:l()"
    onmouseover="r('#33cc33'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#33cc66"><a href="JavaScript:l()"
    onmouseover="r('#33cc66'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#33cc99"><a href="JavaScript:l()"
    onmouseover="r('#33cc99'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#33cccc"><a href="JavaScript:l()"
    onmouseover="r('#33cccc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#33ccff"><a href="JavaScript:l()"
    onmouseover="r('#33ccff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    </tr>
    <tr>
    <td bgcolor="#333300"><a href="JavaScript:l()"
    onmouseover="r('#333300'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#333333"><a href="JavaScript:l()"
    onmouseover="r('#333333'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#333366"><a href="JavaScript:l()"
    onmouseover="r('#333366'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#333399"><a href="JavaScript:l()"
    onmouseover="r('#333399'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#3333cc"><a href="JavaScript:l()"
    onmouseover="r('#3333cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#3333ff"><a href="JavaScript:l()"
    onmouseover="r('#3333ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#339900"><a href="JavaScript:l()"
    onmouseover="r('#339900'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#339933"><a href="JavaScript:l()"
    onmouseover="r('#339933'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#339966"><a href="JavaScript:l()"
    onmouseover="r('#339966'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#339999"><a href="JavaScript:l()"
    onmouseover="r('#339999'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#3399cc"><a href="JavaScript:l()"
    onmouseover="r('#3399cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#3399ff"><a href="JavaScript:l()"
    onmouseover="r('#3399ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#33ff00"><a href="JavaScript:l()"
    onmouseover="r('#33ff00'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#33ff33"><a href="JavaScript:l()"
    onmouseover="r('#33ff33'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#33ff66"><a href="JavaScript:l()"
    onmouseover="r('#33ff66'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#33ff99"><a href="JavaScript:l()"
    onmouseover="r('#33ff99'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#33ffcc"><a href="JavaScript:l()"
    onmouseover="r('#33ffcc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#33ffff"><a href="JavaScript:l()"
    onmouseover="r('#33ffff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    </tr>
    <tr>
    <td bgcolor="#660000"><a href="JavaScript:l()"
    onmouseover="r('#660000'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#660033"><a href="JavaScript:l()"
    onmouseover="r('#660033'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#660066"><a href="JavaScript:l()"
    onmouseover="r('#660066'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#660099"><a href="JavaScript:l()"
    onmouseover="r('#660099'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#6600cc"><a href="JavaScript:l()"
    onmouseover="r('#6600cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#6600ff"><a href="JavaScript:l()"
    onmouseover="r('#6600ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#666600"><a href="JavaScript:l()"
    onmouseover="r('#666600'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#666633"><a href="JavaScript:l()"
    onmouseover="r('#666633'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#666666"><a href="JavaScript:l()"
    onmouseover="r('#666666'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#666699"><a href="JavaScript:l()"
    onmouseover="r('#666699'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#6666cc"><a href="JavaScript:l()"
    onmouseover="r('#6666cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#6666ff"><a href="JavaScript:l()"
    onmouseover="r('#6666ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#66cc00"><a href="JavaScript:l()"
    onmouseover="r('#66cc00'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#66cc33"><a href="JavaScript:l()"
    onmouseover="r('#66cc33'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#66cc66"><a href="JavaScript:l()"
    onmouseover="r('#66cc66'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#66cc99"><a href="JavaScript:l()"
    onmouseover="r('#66cc99'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#66cccc"><a href="JavaScript:l()"
    onmouseover="r('#66cccc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#66ccff"><a href="JavaScript:l()"
    onmouseover="r('#66ccff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    </tr>
    <tr>
    <td bgcolor="#663300"><a href="JavaScript:l()"
    onmouseover="r('#663300'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#663333"><a href="JavaScript:l()"
    onmouseover="r('#663333'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#663366"><a href="JavaScript:l()"
    onmouseover="r('#663366'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#663399"><a href="JavaScript:l()"
    onmouseover="r('#663399'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#6633cc"><a href="JavaScript:l()"
    onmouseover="r('#6633cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#6633ff"><a href="JavaScript:l()"
    onmouseover="r('#6633ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#669900"><a href="JavaScript:l()"
    onmouseover="r('#669900'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#669933"><a href="JavaScript:l()"
    onmouseover="r('#669933'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#669966"><a href="JavaScript:l()"
    onmouseover="r('#669966'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#669999"><a href="JavaScript:l()"
    onmouseover="r('#669999'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#6699cc"><a href="JavaScript:l()"
    onmouseover="r('#6699cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#6699ff"><a href="JavaScript:l()"
    onmouseover="r('#6699ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#66ff00"><a href="JavaScript:l()"
    onmouseover="r('#66ff00'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#66ff33"><a href="JavaScript:l()"
    onmouseover="r('#66ff33'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#66ff66"><a href="JavaScript:l()"
    onmouseover="r('#66ff66'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#66ff99"><a href="JavaScript:l()"
    onmouseover="r('#66ff99'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#66ffcc"><a href="JavaScript:l()"
    onmouseover="r('#66ffcc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#66ffff"><a href="JavaScript:l()"
    onmouseover="r('#66ffff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>

    </tr>
    <tr>
    <td bgcolor="#990000"><a href="JavaScript:l()"
    onmouseover="r('#990000'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#990033"><a href="JavaScript:l()"
    onmouseover="r('#990033'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#990066"><a href="JavaScript:l()"
    onmouseover="r('#990066'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#990099"><a href="JavaScript:l()"
    onmouseover="r('#990099'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#9900cc"><a href="JavaScript:l()"
    onmouseover="r('#9900cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#9900ff"><a href="JavaScript:l()"
    onmouseover="r('#9900ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#996600"><a href="JavaScript:l()"
    onmouseover="r('#996600'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#996633"><a href="JavaScript:l()"
    onmouseover="r('#996633'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#996666"><a href="JavaScript:l()"
    onmouseover="r('#996666'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#996699"><a href="JavaScript:l()"
    onmouseover="r('#996699'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#9966cc"><a href="JavaScript:l()"
    onmouseover="r('#9966cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#9966ff"><a href="JavaScript:l()"
    onmouseover="r('#9966ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#99cc00"><a href="JavaScript:l()"
    onmouseover="r('#99cc00'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#99cc33"><a href="JavaScript:l()"
    onmouseover="r('#99cc33'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#99cc66"><a href="JavaScript:l()"
    onmouseover="r('#99cc66'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#99cc99"><a href="JavaScript:l()"
    onmouseover="r('#99cc99'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#99cccc"><a href="JavaScript:l()"
    onmouseover="r('#99cccc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#99ccff"><a href="JavaScript:l()"
    onmouseover="r('#99ccff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>

    </tr>
    <tr>
    <td bgcolor="#993300"><a href="JavaScript:l()"
    onmouseover="r('#993300'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#993333"><a href="JavaScript:l()"
    onmouseover="r('#993333'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#993366"><a href="JavaScript:l()"
    onmouseover="r('#993366'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#993399"><a href="JavaScript:l()"
    onmouseover="r('#993399'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#9933cc"><a href="JavaScript:l()"
    onmouseover="r('#9933cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#9933ff"><a href="JavaScript:l()"
    onmouseover="r('#9933ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#999900"><a href="JavaScript:l()"
    onmouseover="r('#999900'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#999933"><a href="JavaScript:l()"
    onmouseover="r('#999933'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#999966"><a href="JavaScript:l()"
    onmouseover="r('#999966'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#999999"><a href="JavaScript:l()"
    onmouseover="r('#999999'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#9999cc"><a href="JavaScript:l()"
    onmouseover="r('#9999cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#9999ff"><a href="JavaScript:l()"
    onmouseover="r('#9999ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#99ff00"><a href="JavaScript:l()"
    onmouseover="r('#99ff00'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#99ff33"><a href="JavaScript:l()"
    onmouseover="r('#99ff33'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#99ff66"><a href="JavaScript:l()"
    onmouseover="r('#99ff66'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#99ff99"><a href="JavaScript:l()"
    onmouseover="r('#99ff99'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#99ffcc"><a href="JavaScript:l()"
    onmouseover="r('#99ffcc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#99ffff"><a href="JavaScript:l()"
    onmouseover="r('#99ffff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>

    </tr>
    <tr>
    <td bgcolor="#cc0000"><a href="JavaScript:l()"
    onmouseover="r('#cc0000'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc0033"><a href="JavaScript:l()"
    onmouseover="r('#cc0033'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc0066"><a href="JavaScript:l()"
    onmouseover="r('#cc0066'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc0099"><a href="JavaScript:l()"
    onmouseover="r('#cc0099'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc00cc"><a href="JavaScript:l()"
    onmouseover="r('#cc00cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc00ff"><a href="JavaScript:l()"
    onmouseover="r('#cc00ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc6600"><a href="JavaScript:l()"
    onmouseover="r('#cc6600'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc6633"><a href="JavaScript:l()"
    onmouseover="r('#cc6633'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc6666"><a href="JavaScript:l()"
    onmouseover="r('#cc6666'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc6699"><a href="JavaScript:l()"
    onmouseover="r('#cc6699'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc66cc"><a href="JavaScript:l()"
    onmouseover="r('#cc66cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc66ff"><a href="JavaScript:l()"
    onmouseover="r('#cc66ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cccc00"><a href="JavaScript:l()"
    onmouseover="r('#cccc00'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cccc33"><a href="JavaScript:l()"
    onmouseover="r('#cccc33'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cccc66"><a href="JavaScript:l()"
    onmouseover="r('#cccc66'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cccc99"><a href="JavaScript:l()"
    onmouseover="r('#cccc99'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cccccc"><a href="JavaScript:l()"
    onmouseover="r('#cccccc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ccccff"><a href="JavaScript:l()"
    onmouseover="r('#ccccff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>

    </tr>
    <tr>
    <td bgcolor="#cc3300"><a href="JavaScript:l()"
    onmouseover="r('#cc3300'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc3333"><a href="JavaScript:l()"
    onmouseover="r('#cc3333'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc3366"><a href="JavaScript:l()"
    onmouseover="r('#cc3366'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc3399"><a href="JavaScript:l()"
    onmouseover="r('#cc3399'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc33cc"><a href="JavaScript:l()"
    onmouseover="r('#cc33cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc33ff"><a href="JavaScript:l()"
    onmouseover="r('#cc33ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc9900"><a href="JavaScript:l()"
    onmouseover="r('#cc9900'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc9933"><a href="JavaScript:l()"
    onmouseover="r('#cc9933'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc9966"><a href="JavaScript:l()"
    onmouseover="r('#cc9966'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc9999"><a href="JavaScript:l()"
    onmouseover="r('#cc9999'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc99cc"><a href="JavaScript:l()"
    onmouseover="r('#cc99cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#cc99ff"><a href="JavaScript:l()"
    onmouseover="r('#cc99ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ccff00"><a href="JavaScript:l()"
    onmouseover="r('#ccff00'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ccff33"><a href="JavaScript:l()"
    onmouseover="r('#ccff33'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ccff66"><a href="JavaScript:l()"
    onmouseover="r('#ccff66'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ccff99"><a href="JavaScript:l()"
    onmouseover="r('#ccff99'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ccffcc"><a href="JavaScript:l()"
    onmouseover="r('#ccffcc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ccffff"><a href="JavaScript:l()"
    onmouseover="r('#ccffff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>

    </tr>


    <tr>
    <td bgcolor="#ff0000"><a href="JavaScript:l()"
    onmouseover="r('#ff0000'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff0033"><a href="JavaScript:l()"
    onmouseover="r('#ff0033'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff0066"><a href="JavaScript:l()"
    onmouseover="r('#ff0066'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff0099"><a href="JavaScript:l()"
    onmouseover="r('#ff0099'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff00cc"><a href="JavaScript:l()"
    onmouseover="r('#ff00cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff00ff"><a href="JavaScript:l()"
    onmouseover="r('#ff00ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff6600"><a href="JavaScript:l()"
    onmouseover="r('#ff6600'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff6633"><a href="JavaScript:l()"
    onmouseover="r('#ff6633'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff6666"><a href="JavaScript:l()"
    onmouseover="r('#ff6666'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff6699"><a href="JavaScript:l()"
    onmouseover="r('#ff6699'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff66cc"><a href="JavaScript:l()"
    onmouseover="r('#ff66cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff66ff"><a href="JavaScript:l()"
    onmouseover="r('#ff66ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ffcc00"><a href="JavaScript:l()"
    onmouseover="r('#ffcc00'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ffcc33"><a href="JavaScript:l()"
    onmouseover="r('#ffcc33'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ffcc66"><a href="JavaScript:l()"
    onmouseover="r('#ffcc66'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ffcc99"><a href="JavaScript:l()"
    onmouseover="r('#ffcc99'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ffcccc"><a href="JavaScript:l()"
    onmouseover="r('#ffcccc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ffccff"><a href="JavaScript:l()"
    onmouseover="r('#ffccff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>

    </tr>
    <tr>
    <td bgcolor="#ff3300"><a href="JavaScript:l()"
    onmouseover="r('#ff3300'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff3333"><a href="JavaScript:l()"
    onmouseover="r('#ff3333'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff3366"><a href="JavaScript:l()"
    onmouseover="r('#ff3366'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff3399"><a href="JavaScript:l()"
    onmouseover="r('#ff3399'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff33cc"><a href="JavaScript:l()"
    onmouseover="r('#ff33cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff33ff"><a href="JavaScript:l()"
    onmouseover="r('#ff33ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff9900"><a href="JavaScript:l()"
    onmouseover="r('#ff9900'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff9933"><a href="JavaScript:l()"
    onmouseover="r('#ff9933'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff9966"><a href="JavaScript:l()"
    onmouseover="r('#ff9966'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff9999"><a href="JavaScript:l()"
    onmouseover="r('#ff9999'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff99cc"><a href="JavaScript:l()"
    onmouseover="r('#ff99cc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ff99ff"><a href="JavaScript:l()"
    onmouseover="r('#ff99ff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ffff00"><a href="JavaScript:l()"
    onmouseover="r('#ffff00'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ffff33"><a href="JavaScript:l()"
    onmouseover="r('#ffff33'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ffff66"><a href="JavaScript:l()"
    onmouseover="r('#ffff66'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ffff99"><a href="JavaScript:l()"
    onmouseover="r('#ffff99'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ffffcc"><a href="JavaScript:l()"
    onmouseover="r('#ffffcc'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    <td bgcolor="#ffffff"><a href="JavaScript:l()"
    onmouseover="r('#ffffff'); return true"><img src="w.gif" height=10
    width=10 border=0></a></td>
    </tr>
    </table>
    <form name="f">
    <input type="TEXT" size="7" name="c" value="">
    </form>
    </center>
    #32
      CDDLT 27.10.2005 19:17:18 (permalink)
      Tạo dòng chữ thay đổi màu sắc

      <script language="JavaScript">
      <!--- Rainbow Text JavaScript module written by Peter Harman 1996
      // 100752.1770@compuserve.com
      var rainString = "This is an example of text in rainbow colours using JavaScript."
      var position = -1
      var longness = rainString.length - 1
      function rainbow(rainString) {
      while(position <= longness) {
      document.write("<font color=\ "#ff0000\ ">" + rainString.charAt(position) + "</font>")
      position++
      document.write("<font color=\ "#ffa500\ ">" + rainString.charAt(position) + "</font>")
      position++
      document.write("<font color=\ "#ffff00\ ">" + rainString.charAt(position) + "</font>")
      position++
      document.write("<font color=\ "#008000\ ">" + rainString.charAt(position) + "</font>")
      position++
      document.write("<font color=\ "#0000ff\ ">" + rainString.charAt(position) + "</font>")
      position++
      document.write("<font color=\ "#4b0082\ ">" + rainString.charAt(position) + "</font>")
      position++
      document.write("<font color=\ "#ee82ee\ ">" + rainString.charAt(position) + "</font>")
      position++
      }
      }
      //-->
      </script>
      <script language="JavaScript">
      <!--
      function MakeArray(n){
      this.length=n;
      for(var i=1; i<=n; i++) this=i-1;
      return this
      }

      hex=new MakeArray(16);
      hex[11]="A"; hex[12]="B"; hex[13]="C"; hex[14]="D"; hex[15]="E"; hex[16]="F";
      function ToHex(x){
      var high=x/16;
      var s=high+"";
      s=s.substring(0,2);
      high=parseInt(s,10);
      var left=hex[high+1];
      var low=x-high*16;
      s=low+"";
      s=s.substring(0,2);
      low=parseInt(s,10);
      var right=hex[low+1];
      var string=left+""+right;
      return string;
      }

      function Fade(text){
      text=text.substring(3,text.length-4);
      color_d1=255;
      mul=color_d1/text.length;
      for(i=0;i<text.length;i++){
      color_d1=255*Math.sin(i/(text.length/3));
      color_h1=ToHex(color_d1);
      color_d2=mul*i;
      color_h2=ToHex(color_d2);
      document.write("<FONT COLOR='#FF"+color_h1+color_h2+"'>"+text.substring(i,i+1)+'</FONT>');
      }
      }
      //-->
      </script>
      </head>
      <body bgcolor="#000000">
      <center><h1><font color="#FFFFFF">Rainbow text</font></h1></center>
      <script language="JavaScript">
      <!--- Rainbow
      document.write(rainbow(rainString))
      // -->
      </script>
      <p><font color="#FFFFFF">Difficult to read, isn't it? <g><br>It looks even worse on a light background!</font></p><hr align="CENTER" width="50%">
      <p><font color="#FFFFFF">Here's another example produced by a different Javascript:</font></p>
      <p><script language="JavaScript">
      <!--
      Fade("-->An example of rainbow colours.<!--");
      //-->
      </script></p>
      #33
        CDDLT 27.10.2005 19:17:48 (permalink)
        Tiêu đề chạy dọc theo trang web

        <script language="JavaScript" type="text/javascript">
        <!--
        var p=parent,v='test';
        p.name=v;
        //global variables
        var layerRef="null",layerStyleRef="null",styleSwitch="null",topStopPoint="null",layerRef="null",styleSwitch="null",currtop=-100;
        var topStopPoint=-700,d=document.referrer;
        var backupTopStopPoint=topStopPoint;
        var currTop=200;
        var pxSwitch="null";
        var moving=1;
        var k=0;
        function init()
        {
        if (navigator.appName == "Netscape")
        {
        layerStyleRef="layer.";
        layerRef="document.layers";
        styleSwitch="";
        pxSwitch="";
        }
        else
        {
        layerStyleRef="layer.style.";
        layerRef="document.all";
        styleSwitch=".style";
        pxSwitch="px";
        }
        moveLayerUp('credits',k);
        }
        function pause(layerName)
        {
        moving*=-1;
        if(moving<0)
        topStopPoint=currTop+pxSwitch;
        else
        {
        topStopPoint=backupTopStopPoint;
        moveLayerUp(layerName,k);
        }
        }
        function restart(layerName)
        {
        k++;
        currTop=200;
        topStopPoint=backupTopStopPoint;
        if(moving<0)
        {
        moving*=-1;
        moveLayerUp(layerName,k);
        }
        }
        function moveLayerUp(layerName,n)
        {
        if (eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top != topStopPoint'))
        {
        currTop-=4;
        eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top = currTop');
        setTimeout('moveLayerUp("'+layerName+'",'+n+')',50);
        }
        }
        //-->
        </script>
        <style type="text/css">
        #creditsControls {z-index: 1; position: absolute; top: 150; left: 350px; width: 250px;}
        H1 {text-align : center; color: #000080}
        H2 {text-align : center; color: #ff0000}
        #credits {z-index: -2; position: absolute; top: 200; left: 30px; width: 300px;}
        </style>
        </head>
        <body onLoad="init()">
        <h1 style="color: #000000;">Scrolling Credits</h1>
        <div id="creditsControls">
        <a href="javascript:pause('credits');">Pause/Unpause Credits</a><br>
        <a href="javascript:restart('credits');">Restart</a></b>
        <br><br><br></div>
        <div id="credits">
        <h1>Site Design by</h1>
        <h2>Alan Palmer</h2>
        <br><br>
        <h1>Written by</h1>
        <h2>Alan Palmer</h2>
        <br><br>
        <h1>HTML Editor</h1>
        <h2>HomeSite 4.01</h2>
        <br><br>
        <h1>Additional HTML Editing</h1>
        <h2>TextPad 3.2.5<br>MS FrontPage 98<br>Windows Notepad</h2>
        <br><br>
        <h1>Graphics Editor</h1>
        <h2>Paint Shop Pro 5.03</h2>
        <br><br>
        <h1>Additional Graphics</h1>
        <h2>Xara 3D 2.0<br>Xara Webster<br>Xara Webstyle</h2>
        <br><br><br><br>
        </div>
        <div id="footer+text" style="position: absolute; left: 10; top: 230"><layer name="footer+text" left=10 top=230><p>Use the links above to pause, stop pausing, or to restart the credits once they've finished running. Although this script works in Netscape 4.x, it works best when viewed using MSIE 4.x or 5.0.</p>
        #34
          CDDLT 27.10.2005 19:18:15 (permalink)
          Dòng thông báo cuộn trong textbox

          <script language="JavaScript">
          <!-- start javascript ---

          /*
          Feel free to use this script in your own page, making changes were
          necessary, but do leave the following line in the code. Thanks

          Copyright 1996, E.T. Smith Associates Brogue, Pennsylvania, USA

          Special thanks to Andy Augustine for helping me rewrite the
          script to be more readable and object oriented. Check out
          http://www.freqgrafx.com/411/ for javascript info and codes.
          */

          /* The following set of parameters control the scrolling text and the
          box that contains it.

          bgn_ln is the line which you want to appear in the box when the
          page loads, is only shown once. Leave blank if there is
          to be no beginning line (though do leave the quotes).

          txt_ln is the scrolling text. There is no real need to concatenate
          the line. Though for a long string of several messages it
          easier to edit the text using concatenation as shown.

          end_ln is the text you want to appear the box when the scrolling
          is over. Leave blank if there is to be no end message.

          speed is the number of milliseconds for the line to move one
          character. A lower number will cause a higher speed.
          Note: Higher speeds are limited by the speed of the user's
          cpu and other loads on it.

          box_lg is the length of the text box (form input element) in
          which the scrolling text appears

          max is the maximum number of scroll iterations to be done. To
          have a continuous scroll, just use rather large number(1000).
          I doubt everyone will be looking at it take long.

          the other variables: count; pos; stop; box_ln; msg_ln are used by the
          script and should be left at their currently set initation values.

          The names of the form and box used for scrolling are scrlform and
          scrlbox. I won't expect you to need different names, but if you do,
          make sure to change all occurances of these names in the following
          script and the script in the bottom half of the page.

          Also if the scrolling text is to be located such that it might not
          be seen when the page loads, please read the comments in the
          function scrlbox about preventing inadvertant stops by the user.

          */

          function scrl_param(){
          this.bgn_ln = "About to start to scroll";
          this.txt_ln = "Scrolling Text Box... "
          + "A number of features... "
          + "make this way of showing scrolling text... "
          + "much better than others... "
          + "especially the ability to stop it scrolling! "
          ;
          this.end_ln = "All Done Scrolling";

          this.speed = 100;
          this.box_lg = 70;
          this.max = 10;
          this.count = 0;
          this.pos = 0;
          this.stop = 0;
          this.box_ln = " ";
          if( this.txt_ln.length < this.box_lg ){
          this.msg_ln = this.txt_ln;
          for( var i = 0 ; i < (this.box_lg - this.txt_ln.length) ; i++ )
          this.msg_ln += " ";
          }
          else{
          this.msg_ln = this.txt_ln;
          this.msg_ln += " ";
          }

          }

          var scrl = new scrl_param();

          function scrlbox()
          {
          /* if whole has been scrolled, reset to beginning of line */
          if( scrl.pos > scrl.msg_ln.length ){
          scrl.pos = 1;
          scrl.count++;
          }

          /* construct display line using the line position property */
          scrl.box_ln = " ";
          scrl.box_ln += scrl.msg_ln.substring(scrl.pos,scrl.msg_ln.length);
          scrl.box_ln += scrl.msg_ln.substring(0,scrl.pos);

          /* continue, if user hasn't unfocused the box */
          if( scrl.stop == 0 )
          {
          /* The following sets focus on the scroll box, allowing the user to
          easy stop the text by clicking out of the box. If scroll is to
          be located such that when the page is loaded the box may not be
          seen, the user may inadvertantly stop the text by clicking on
          the page before seeing the box. For this case you may wish to
          comment out the following line. The user will then have to click
          in the box and then out of the box to stop the text.
          */
          document.scrlform.scrlbox.focus();

          /* continue if the maximum iterations have not been done */
          if( scrl.count < scrl.max )
          {
          scrl.pos++; /* advance line postion for next iteration */
          document.scrlform.scrlbox.value = scrl.box_ln; /* display new line */
          time3 = window.setTimeout('scrlbox()',scrl.speed); /* restart function */
          }
          else /* maximum iteration been done */
          {
          if ( scrl.end_ln.length > 2 ){ /* display end message if any */
          time2 = window.setTimeout("document.scrlform.scrlbox.value ="+ 'scrl.end_ln',scrl.speed);
          }
          document.scrlform.scrlbox.blur(); /* remove focus, so user */
          } /* can easily restart */
          }


          }
          /* restart function */
          function startscrl()
          {
          scrl.stop = 0;
          scrl.pos = 0;
          scrlbox();
          }

          /* stop function */
          function stopscrl()
          {
          scrl.stop = 1;
          }

          // --- end javascript -->
          </script>

          <script language="JavaScript">

          <!-- start javascript ---

          /*
          Scrolling text field written by javascript, so non-javascript
          browsers will not see the field.
          */

          /* change form name and input name attributes if needed and be sure
          to make necessary changes else where in the script, or
          just use as is
          */

          document.write("<DIV ALIGN=CENTER><FORM NAME='scrlform'>");
          document.write("<INPUT NAME='scrlbox' SIZE=" + scrl.box_lg + " onFocus='startscrl();' onBlur='stopscrl();' VALUE='" + scrl.bgn_ln + "'><BR>");
          document.write("<p><SMALL><EM>To stop scrolling, click anywhere on the page except the scrolling text field. ");
          document.write("To restart scrolling text, click in the text field.</EM></p>");

          /*
          Time delay for scrolling is set at 2 seconds (2000 milliseconds), you
          change this value if desired, though it is suggest that at least 500
          millseconds be used (NN2.0 for Win95 has problems running without a
          little delay in starting).
          */

          time1 = window.setTimeout('scrlbox()',2000);

          document.write("<P></FORM></DIV>");

          // --- end javascript -->
          </script>
          #35
            CDDLT 27.10.2005 19:18:45 (permalink)
            Dòng chữ cuộn trong một button

            <script language="JavaScript">
            <!-- Hide from old browsers
            // Looking to steal this code? It's easier if you
            // steal it from http://www.voicenet.com/~leel/
            var b_m=" Click Here!..";
            function b_scroll() {
            b_m=b_m.substring(1,b_m.length)+ b_m.substring(0,1);
            document.forms[0].move_b.value=b_m;
            setTimeout("b_scroll()",150);
            }
            // end hiding --></script></head>
            <body bgcolor="#ffe4c4" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000" onload="b_scroll()">
            <div align="center"><h1>Scrolling Text in a Button</h1>
            <br><br><br>
            <p><form><input type="button" name="move_b" value="Click Here!" onclick="alert('Howsabout that then?')"></form></div></p>
            #36
              CDDLT 27.10.2005 19:19:15 (permalink)
              Thông báo thay đổi trong textbox

              <script language="JavaScript">
              <!-- begin
              // Made By By Smallfri. Copyright 1996-1997 All Rights Reserved.
              // This Script Is Fully Useable On Any Page As Long As These Comments Remain & You Link Somewheres On You Page Back To Mine 'Smallfri's Home' (http://www.nsis.com/~coadydk/).
              // There Are Three Messages 'msg', 'msg1' & 'msg2', Replace The Words In The Quotes To Make It Say Somthing Different.
              // 'msg'-'msg2' Is The Order In Which They Appear
              var msg="Hi! Welcome to my page!"
              var msg1="Take your time and look around."
              var msg2="Don't forget to bookmark this site!"
              function showIt()
              {
              var arrayx = new Array(msg,
              msg1, msg2,
              "etc");
              var now = new Date();
              var secs = now.getSeconds();
              var ind = (secs % 3);
              document.forms[0].elements[0].value=arrayx[ind];
              setTimeout("showIt()",2000)
              }
              //--->
              </script>
              </head>
              <body onload="window.showIt()">
              <center><form>
              <input type=text size=40 value="Hi" name="Ho" onfocus="blur()" >
              </textarea>
              </form></center><hr>
              #37
                CDDLT 27.10.2005 19:19:41 (permalink)
                Dòng chữ cuộn dưới thanh trạng thái

                <script language="JavaScript">
                <!--
                function scrollit_r2l(seed)

                {

                var m1 = "Hello, everyone! don't forget to come to www.shop4al.com for shopping! ";

                var msg=m1;

                var out = " ";

                var c = 1;

                if (seed > 100) {

                seed--;

                var cmd="scrollit_r2l(" + seed + """)";

                timerTwo=window.setTimeout(cmd,100);

                }

                else if (seed <= 100 && seed > 0) {

                for (c=0 ; c < seed ; c++) {

                out+=" ";

                }

                out+=msg;

                seed--;

                var cmd="scrollit_r2l("" + seed + """)";

                window.status=out;

                timerTwo=window.setTimeout(cmd,100);

                }

                else if (seed <= 0) {

                if (-seed < msg.length) {

                out+=msg.substring(-seed,msg.length);

                seed--;

                var cmd="scrollit_r2l(" + seed + """)";

                window.status=out;

                timerTwo=window.setTimeout(cmd,100);

                }

                else {

                window.status=" ";

                timerTwo=window.setTimeout("scrollit_r2l(100)",75);

                }

                }

                }
                //-->
                </script>
                </head>
                <body onLoad="timerONE=window.setTimeout('scrollit_r2l(100)',500);">
                #38
                  CDDLT 27.10.2005 19:20:09 (permalink)
                  Chuyển đổi giữa độ C và độ F

                  <center><h1>A Simple Temperature Converter</h1></center>
                  <p>Enter a number in either field, then click outside the text box.</p>
                  <!-- This script and many more are available online from -->
                  <!-- The JavaScript Source!! http://javascriptsource.com -->
                  <form>
                  <b>F:</b>
                  <input type="text" name="F" value="32"
                  onChange="C.value = 100/(212-32) * (this.value - 32 )"><br><br>
                  <b>C:</b>
                  <input type="text" name="C" value="0"
                  onChange="F.value = (212-32)/100 * this.value + 32 "><br>
                  </form>
                  #39
                    CDDLT 27.10.2005 19:20:44 (permalink)
                    Đồng hồ trên button và tính thời gian xem trang web

                    <center><p><script language="JavaScript">
                    <!--
                    day = new Date();
                    miVisit = day.getTime();
                    function clock() {
                    dayTwo = new Date();
                    hrNow = dayTwo.getHours();
                    mnNow = dayTwo.getMinutes();
                    scNow = dayTwo.getSeconds();
                    miNow = dayTwo.getTime();
                    if (hrNow == 0) {
                    hour = 12;
                    ap = " AM";
                    } else if(hrNow <= 11) {
                    ap = " AM";
                    hour = hrNow;
                    } else if(hrNow == 12) {
                    ap = " PM";
                    hour = 12;
                    } else if (hrNow >= 13) {
                    hour = (hrNow - 12);
                    ap = " PM";
                    }
                    if (hrNow >= 13) {
                    hour = hrNow - 12;
                    }
                    if (mnNow <= 9) {
                    min = "0" + mnNow;
                    }
                    else (min = mnNow)
                    if (scNow <= 9) {
                    secs = "0" + scNow;
                    } else {
                    secs = scNow;
                    }
                    time = hour + ":" + min + ":" + secs + ap;
                    document.form.button.value = time;
                    self.status = time;
                    setTimeout('clock()', 1000);
                    }
                    function timeInfo() {
                    milliSince = miNow;
                    milliNow = miNow - miVisit;
                    secsVisit = Math.round(milliNow / 1000);
                    minsVisit = Math.round((milliNow / 1000) / 60);
                    alert("You have spent " + milliNow + " milliseconds on this page. "
                    + "About " + minsVisit + " minutes, and "
                    + secsVisit + " seconds.");
                    }
                    document.write("<form name=\ "form\ ">"
                    + "<input type=button value=\ "Click for info!\ ""
                    + " name=button onClick=\ "timeInfo()\ "></form>");
                    onError = null;
                    clock();
                    //-->
                    </script></p></center>
                    #40
                      CDDLT 27.10.2005 19:21:04 (permalink)
                      Thể hiện thời gian xem trang web

                      <script language="JavaScript">
                      <!--
                      startday = new Date();
                      clockStart = startday.getTime();

                      function initStopwatch()
                      {
                      var myTime = new Date();
                      var timeNow = myTime.getTime();
                      var timeDiff = timeNow - clockStart;
                      this.diffSecs = timeDiff/1000;
                      return(this.diffSecs);
                      }

                      function getSecs()
                      {
                      var mySecs = initStopwatch();
                      var mySecs1 = ""+mySecs;
                      mySecs1= mySecs1.substring(0,mySecs1.indexOf(".")) + " secs.";
                      document.forms[0].timespent.value = mySecs1
                      window.setTimeout('getSecs()',1000);
                      }

                      //-->
                      </script>
                      <body onLoad="window.setTimeout('getSecs()',1)">
                      <form>Time spent on this page: <input size=9 name=timespent></form>
                      #41
                        CDDLT 27.10.2005 19:21:24 (permalink)
                        Chữ hiện theo dạng đánh máy

                        <center><h1>Typing Text</h1></center>
                        <script language="JavaScript1.2">
                        var it=0
                        var head="display:''"
                        function initialize(){
                        mytext=typing.innerText
                        var myheight=typing.offsetHeight
                        typing.innerText=''
                        document.all.typing.style.height=myheight
                        typeit()
                        }
                        function typeit(){
                        typing.insertAdjacentText("beforeEnd",mytext.charAt(it))
                        if (it<mytext.length-1){
                        it++
                        setTimeout("typeit()",100)
                        }
                        else
                        return
                        }
                        if (document.all)
                        document.body.onload=initialize
                        </script>
                        <p id="typing" style="visiblity:hidden;height:2pix">If you are using Internet Explorer 4.x or later, this text should be appearing one letter at a time, as if it were being typed. Other browsers should just see the text as normal.</p>
                        #42
                          CDDLT 27.10.2005 19:22:43 (permalink)
                          Chuyển đổi đơn vị tính vận tốc

                          <script language="JavaScript" type="text/javascript">
                          <!-- This script and many more are available free online at -->
                          <!-- The JavaScript Source!! http://javascript.internet.com -->
                          <!--
                          function initArray() {
                          this.length = initArray.arguments.length;
                          for (var i = 0; i < this.length; i++) {
                          this = initArray.arguments;
                          }
                          }
                          var isn07 = new initArray("4b","5b","8b","8b");
                          isn07[0] = "~01~10.01~20.6~30.036~40.03281~51.9685~60.02237~70.01944~8";
                          isn07[1] = "~0100~11~260~33.6~43.281~5196.85~62.237~71.944~8";
                          isn07[2] = "~01.66667~10.016667~21~30.06~40.05468~53.281~60.03728~70.03240~8";
                          isn07[3] = "~027.78~10.2778~216.6667~31~40.9113~554.68~60.6214~70.53996~8";
                          isn07[4] = "~030.48~10.3048~218.29~31.097~41~560~60.68181818~70.59248~8";
                          isn07[5] = "~00.5080~10.00508~20.3048~30.01829~40.016667~51~60.01136~70.00987~8";
                          isn07[6] = "~044.7~10.447~226.82~31.609~41.467~588~61~70.86898~8";
                          isn07[7] = "~051.44~10.5144~230.87~31.852~41.688~5101.3~61.151~71~8";
                          function velCon() {
                          for (var i = 0; i < 8; i++) {
                          if (document.isnform07.veli.checked) {
                          veli = i;
                          velinm = document.isnform07.veli.value;
                          }
                          }
                          for (var i = 0; i < 8; i++) {
                          if (document.isnform07.velo.checked) {
                          velo = i;
                          velonm = document.isnform07.velo.value;
                          }
                          }
                          useri = document.isnform07.velinp.value;
                          if (useri == 0) {
                          useri = 1;
                          document.isnform07.velinp.value = useri;
                          }
                          mulstr = isn07[veli];
                          picker = "~" + velo;
                          ps = mulstr.indexOf(picker);
                          velo++;
                          picker = "~" + velo;
                          ps1 = mulstr.indexOf(picker);
                          mulstr = mulstr.substring((ps + 2),ps1);
                          ps = (useri * mulstr);
                          picker = "";
                          picker += ps
                          ps1 = picker.indexOf(".");
                          if (ps1 > -1) {
                          ps = ps + .000001;
                          picker = "";
                          picker += ps;
                          ps2 = picker.indexOf("e");
                          if (ps2 < 0) {
                          picker = picker.substring(0,(ps1 + 6));
                          }
                          if (ps2 == 0 || ps2 > 0) {
                          ps3 = picker.indexOf("00000");
                          if (ps3 > 0) {
                          picker = picker.substring(0,ps3 + 1) + picker.substring(ps2,picker.length);
                          }
                          }
                          }
                          picker = useri + " " + velinm + " = " + picker + " " + velonm
                          document.isnform07.velout.value = picker;
                          }
                          // -->
                          </script>
                          <div align="center"><h1>Velocity Calculator</h1></div>
                          <div align="center"><table border=1>
                          <tr><th colspan=10 align=center><form name="isnform07"><font color="blue">Velocity Equivalents</font></th></tr>
                          <tr><td colspan=10 valign=top><strong>First, type the number you wish converted here: </strong>
                          <input type="text" name="velinp" size=30 value="" onChange="velCon();"><br>
                          <strong>Then click radio buttons for desired conversion:</td></tr>
                          <tr><td align=center><font color="red"><strong>From:</strong></font></td>
                          <td align=center valign=top>cm/sec<br>
                          <input type="radio" name="veli" value="cm/sec" checked onClick = ""></td>
                          <td align=center valign=top>m/sec<br>
                          <input type="radio" name="veli" value="m/sec" onClick = ""></td>
                          <td align=center valign=top>m/min<br>
                          <input type="radio" name="veli" value="m/min" onClick = ""></td>
                          <td align=center valign=top>km/hr<br>
                          <input type="radio" name="veli" value="km/hr" onClick = ""></td>
                          <td align=center valign=top>ft/sec<br>
                          <input type="radio" name="veli" value="ft/sec" onClick = ""></td>
                          <td align=center valign=top>ft/min<br>
                          <input type="radio" name="veli" value="ft/min" onClick = ""></td>
                          <td align=center valign=top>mi/hr<br>
                          <input type="radio" name="veli" value="mi/hr" onClick = ""></td>
                          <td align=center valign=top>Knots<br>
                          <input type="radio" name="veli" value="Knots" onClick = ""></td>
                          <tr><td align=center><font color="red"><strong>To:</strong></font></td>
                          <td align=center valign=top>cm/sec<br>
                          <input type="radio" name="velo" value="cm/sec" onClick = ""></td>
                          <td align=center valign=top>m/sec<br>
                          <input type="radio" name="velo" value="m/sec" checked onClick = ""></td>
                          <td align=center valign=top>m/min<br>
                          <input type="radio" name="velo" value="m/min" onClick = ""></td>
                          <td align=center valign=top>km/hr<br>
                          <input type="radio" name="velo" value="km/hr" onClick = ""></td>
                          <td align=center valign=top>ft/sec<br>
                          <input type="radio" name="velo" value="ft/sec" onClick = ""></td>
                          <td align=center valign=top>ft/min<br>
                          <input type="radio" name="velo" value="ft/min" onClick = ""></td>
                          <td align=center valign=top>mi/hr<br>
                          <input type="radio" name="velo" value="mi/hr" onClick = ""></td>
                          <td align=center valign=top>Knots<br>
                          <input type="radio" name="velo" value="Knots" onClick = ""></td>
                          <tr><td colspan=10 align=center valign=top>
                          <input type="button" value=" Click for Conversion " onClick="velCon();">
                          <input type="reset" value=" Reset Values "><br>
                          <input type="text" name="velout" size=60 value="" onClick="velCon();">
                          </td></tr>
                          </table></form></div>
                          #43
                            CDDLT 27.10.2005 19:24:08 (permalink)
                            Chuyển đổi đơn vị đo khối lượng

                            <script type="text/javascript" language="JavaScript">
                            <!--
                            // Script Editor: Howard Chen

                            // Browser Compatible for the script: IE 3.0 or Higher

                            // Netscape 2.0 or Higher

                            // This script is free as long as you keep its credits

                            /*The way this works is the converter converts the number

                            into the smallest unit in the converter, in this case it will

                            be gram, and then it converts the unit fram gram to other units.*/

                            function nofocus()

                            {

                            document.convert.InUnit.focus()

                            }

                            var gValue = 1

                            var kgValue = 1000

                            var ounceValue = 28.3495

                            var lbValue = 453.592

                            var tValue = 907184

                            function toCM()

                            {

                            var i = document.convert.unit.selectedIndex

                            var thisUnit = document.convert.unit.options.value

                            if (thisUnit == "G")

                            {

                            document.convert.g.value = document.convert.InUnit.value

                            }

                            else if(thisUnit == "KG")

                            {

                            document.convert.g.value = document.convert.InUnit.value * kgValue

                            }

                            else if(thisUnit == "OUNCE" )

                            {

                            document.convert.g.value = document.convert.InUnit.value * ounceValue

                            }

                            else if(thisUnit == "LB" )

                            {

                            document.convert.g.value = document.convert.InUnit.value * lbValue

                            }

                            else if(thisUnit == "T" )

                            {

                            document.convert.g.value = document.convert.InUnit.value * tValue

                            }

                            toAll()

                            }

                            function toAll()

                            {

                            var m = document.convert.g.value

                            document.convert.kg.value = m / kgValue

                            document.convert.ounce.value = m / ounceValue

                            document.convert.lb.value = m / lbValue

                            document.convert.t.value = m / tValue

                            }
                            //-->
                            </script>
                            <center><h1>Weight Converter</h1></center>
                            <p> This script creates a weight converter that can convert five different units at one time. To use it, choose your unit at the first line and enter the a number in the box beside it, then click the convert button. It automatically converts your choice to all five units.</p>
                            <div align="center"><form name="convert">
                            <table border=1>
                            <tr><th>Unit</th><th>Number</th></tr>
                            <tr>
                            <td>
                            <select name="unit">
                            <option value = "G">Gram
                            <option value = "KG">Kilogram
                            <option value = "OUNCE">Ounce
                            <option value = "LB">Pound
                            <option value = "T">U.S. Ton
                            </select>
                            </td>
                            <td>
                            <input type="text" name="InUnit" size="20" maxlength="20" value="0">
                            </td>
                            </tr>
                            <tr>
                            <td>
                            Gram: </td>
                            <td>
                            <input type="text" name="g" size="20" maxlength="20" value="0" onFocus="nofocus()">
                            </td>
                            </tr>
                            <tr>
                            <td>
                            Kilogram:
                            </td>
                            <td>
                            <input type="text" name="kg" size="20" maxlength="20" value="0" onFocus="nofocus()">
                            </td>
                            </tr>
                            <tr>
                            <td>
                            Ounce: </td>
                            <td>
                            <input type="text" name="ounce" size="20" maxlength="20" value="0" onFocus="nofocus()">
                            </td>
                            </tr>
                            <tr>
                            <td>
                            Pound: </td>
                            <td>
                            <input type="text" name="lb" size="20" maxlength="20" value="0" onFocus="nofocus()">
                            </td>
                            </tr>
                            <tr>
                            <td>
                            U.S. Ton: </td>
                            <td>
                            <input type="text" name="t" size="20" maxlength="20" value="0" onFocus="nofocus()"></td>
                            </tr>
                            <tr>
                            <td>
                            <input type="Reset" value="Start Over" width=100>
                            </td>
                            <td>
                            <input type="button" value="Convert" onClick="toCM()" width=150>
                            </td>
                            </tr>
                            </table>
                            </form>
                            </font>
                            </td></tr>
                            </table></div>
                            #44
                              racrui 30.10.2005 16:14:53 (permalink)
                              anh oi chi lun chổ để coy đoạn code đó chứ
                              anh giup di
                              em làm cho nay nè
                              www.nguyenthuonghien.net.tf
                              #45
                                Thay đổi trang: < 123 > >> | Trang 3 của 4 trang, bài viết từ 31 đến 45 trên tổng số 58 bài trong đề mục
                                Chuyển nhanh đến:

                                Thống kê hiện tại

                                Hiện đang có 0 thành viên và 4 bạn đọc.
                                Kiểu:
                                2000-2024 ASPPlayground.NET Forum Version 3.9