📢 Loạt tính năng mới: Kết nối tài khoản Diễn Đàn với toàn bộ Thư Viện (Truyện/Thơ/Nhạc/Phim/Ẩm Thực)
Xin chào cả nhà!


Ban quản trị vừa hoàn tất một loạt tính năng mới, kết nối tài khoản Diễn Đàn với toàn bộ các khu vực Truyện, Thơ, Nhạc, Phim và Ẩm Thực. Xin tổng kết lại để mọi người tiện theo dõi và sử dụng:

1. Đăng nhập dùng chung toàn site
Chỉ cần 1 tài khoản Diễn Đàn, đăng nhập một lần là dùng được ở mọi khu vực. Nút "Đăng nhập / Đăng ký" đã thay cho "Giới thiệu / Trợ giúp" cũ ở đầu mỗi trang.

2. Thảo luận ngay dưới tác phẩm
Mỗi truyện, bài thơ, bài hát, phim, món ăn giờ có khung bình luận riêng ngay trên trang đọc/nghe/xem - không cần qua diễn đàn mới góp ý được. Bình luận đầu tiên sẽ tự tạo 1 chủ đề trong mục "💬 Thảo Luận Tác Phẩm Thư Viện" để mọi người cùng trao đổi.

3. Theo dõi tác phẩm
Bấm "🔔 Theo dõi tác phẩm" để nhận thông báo qua email ngay khi truyện có chương mới.

4. Yêu thích & Lịch sử đọc
Đánh dấu "⭐ Yêu thích" các tác phẩm ưng ý, và hệ thống tự ghi lại "🕘 Lịch sử đọc" mỗi khi bạn ghé đọc/nghe/xem - đồng bộ theo tài khoản, xem lại bất cứ lúc nào trong menu thành viên.

5. Huy hiệu hoạt động
Một vài huy hiệu nhỏ (bình luận viên, người theo dõi, người sưu tầm, thành viên kỳ cựu...) sẽ tự xuất hiện trên hồ sơ khi bạn hoạt động tích cực - hoàn toàn không phải hệ thống điểm/tiền thưởng, chỉ mang tính ghi nhận cho vui.

6. Ghi công người đóng góp
Tên người đăng nội dung (đánh máy, sưu tầm...) giờ sẽ tự động liên kết về hồ sơ Diễn Đàn nếu trùng với một tài khoản đang có trên diễn đàn.

7. Báo lỗi nội dung
Phát hiện lỗi chính tả, thiếu nội dung, ảnh hỏng... trong lúc đọc? Bấm "🚩 Báo lỗi nội dung" ngay trên trang, không cần rời khỏi tác phẩm đang xem.

8. Cải thiện giao diện trên điện thoại
Đầu trang và khu vực diễn đàn đã được chỉnh lại cho gọn gàng hơn trên màn hình nhỏ.

Rất mong nhận được góp ý thêm từ cả nhà để hoàn thiện dần. Cảm ơn mọi người đã luôn đồng hành cùng Việt Nam Thư Quán!

Diễn Đàn » Hướng Dẫn Lập trình

JavaScript dành cho các bạn học thiết kế Web

57 trả lời, 35.802 lượt xem — Trang 2 / 2
Tạo một dropdown list

<script language="JavaScript">
<!--
function go(){
if (document.selecter.select1.options[document.selecter.select1.selectedIndex].value != "none") {
location = document.selecter.select1.options[document.selecter.select1.selectedIndex].value
}
}
//-->
</script>
</head>
<body>
<center><h1>A Dropdown List</h1></center>
<center><script language="JavaScript">
<!--
document.write('<form name="selecter"><select name="select1" size=1>');
document.write('<option value=none>Select your destination');
document.write('<option value=none>--------------------');
document.write('<option value="http://www.shop4all.com">Shopping Page');
document.write('<option value="http://www.coomedia.com">Main Page');
document.write('<option value="http://www.yahoo.com">Navigation');
document.write('</select>');
document.write('<input type="button" value="Go" onclick="go()">');
document.write('</form>');
// end hiding contents -->

//parent.cont.location.href =
//<frameset cols="37%,*">
// <frame name="boxcont" src="boxcont.htm" marginwidth="10" marginheight="10" scrolling="auto" //frameborder="no">
// <frame name="cont" src="cont.htm" marginwidth="10" marginheight="10" scrolling="auto" //frameborder="no">
//</frameset>

</script></center>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
Mở rộng thể hiện các liên kết từ một tiêu đề

<script language="JavaScript1.2">
<!--
/*Contractable Headers script- By Website Abstraction
(www.wsabstract.com)
Over 200+ free JavaScripts here!
*/
var head="display:''"
function doit(header){
var head=header.style
if (head.display=="none")
head.display=""
else
head.display="none"
}
//-->
</script>

<h2 style="cursor:hand" onClick="doit(document.all[this.sourceIndex+1])" title="Click
here to expand/contract!">Some JavaScript Links</h2>
<span style="display:none" style=&{head};>
<dl>
<dt><a
href="http://developer.netscape.com/docs/manuals/communicator/jsguide4/index3.ht
m" target="_top">Netscape</a><dd>The official source about JavaScript
<dt><a href="http://javascriptsource.com" target="_top">The JavaScript
Source</a><dd>Lots of good examples
<dt><a href="http://www.ce.net/users/ryan/java/" target="_top">The Unofficial
JavaScript Resource Center</a>
<dd>Some useful examples
<dt><a href="http://www.coolshare.com/html/" target="_top">JAVAZOO</a>
<dd>A page stuffed with JavaScript examples
<dt><a href="http://javascript.developer.com/" target="_top">Gamelan JavaScript
Pages</a>
<dd>A truly excellent collection of links to JavaScript pages and collections
<dt><a href="http://www.freqgrafx.com/411/library.html">Snippet Library</a>
<dd>A fine collection of scripts
<dt><a href="http://www.geocities.com/SiliconValley/7116/">JavaScript Planet</a>
<dd>Some nice scripts
<dt><a href="http://irt.org/">IRT.ORG</a>
<dd>An excellent collection of articles and scripts.
</dl>
</span>
<h2 style="cursor:hand" onClick="doit(document.all[this.sourceIndex+1])" title="Click
here to expand/contract!">Some DHTML Links</h2>
<span style="display:none" style=&{head};>
<table cellspacing="10" cellpadding="2">
<tr><td><a href="http://www.microsoft.com/workshop/author/dhtml/">Microsoft's Site
Builder Network<br>-Dynamic HTML</a></td>
<td><a href="http://www.dhtmlzone.com/index3.html">Macromedia's DHTML
Zone</a></td></tr>
<tr><td><a
href="http://developer.netscape.com/library/documentation/communicator/dynhtml/ind
ex3.htm">Dynamic HTML in Netscape Communicator</a></td>
<td><a href="http://www.erols.com/jrule/dhtml/">DHTML Demos</a></td></tr>
<tr><td><a href="http://www.insidedhtml.com/home.htm">Inside DHTML</a></td>
<td><a href="http://members.tripod.com/~dynduo/ ">The Dynamic Duo</a></td></tr>
<tr><td><a href="http://www.webreference.com/dhtml/">Dynamic HTML
Lab</a></td>
<td><a href="http://webcoder.com/">WebCoder.com</a></td></tr>
<tr><td><a href="http://rapid.wrox.co.uk/webdev/BookList.asp">The Wrox Web-
Developer<br>Books and Samples Page</a></td>
<td><a href="http://www.projectcool.com/developer/">Project Cool<br>Developer
Zone</a></td></tr></table>
</span>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
Dòng văn bản hiện lên rồi mờ dần

<style>
body{background-color:#ffe4c4}
A{color:Navy; text-decoration:none}
A:hover{color:red}
A:visited:{color:#808080}
TD{font-family:arial,helvetica; font-size:10pt}
</style>
<script language="JavaScript1.2">
/********************************************************************************
This script is made by and copyrighted to Thomas Brattli at www.bratta.com
Visit for more great scripts.
This may be used freely as long as this msg is intact!
********************************************************************************
Browsercheck:*/
ie=document.all?1:0
n=document.layers?1:0

/********************************************************************************
Here are the variables you must set: (this is the only part you have to change)

Remember tho, if you wan't different size for the layers, different clip or anything
change that in the stylesheet.
*/

//The delay between the fades (in milliseconds) smaller value gives less time:
betweendelay=3000

//Do you wan't it to start over on the first one when it's gone trought all the news?
//(set to 0 if not)
var loop=1

//What font do you want it use?
FontFace='arial,helvetiva'

//What font-size (in pixel)?
FontSize=14

//Do you want it to fade out as well? 1 for on, 0 for off
fadeback=1

//Set the colors, first color is same as background, last color is the color it stops at:
//You can have upto 7 colors, set the ones you wan't use to 0
colors=new Array()
colors[0]='#ffe4c4'
colors[1]='#EEEEEE'
colors[2]='#CCCCCC'
colors[3]='#999999'
colors[4]='#666666'
colors[5]='#333333'
colors[6]='#000000'

//This is the news you wanna have, set the link and the text. If you don't wan't it to link anywhere
//use a # as the link
news=new Array()
//Copy the three lines and change the info and numbers to get more news.
news[0]=new Array()
news[0]["text"]="JavaScript Resources contains hundreds of FREE JavaScripts and DHTML scripts!"
news[0]["link"]="http://www.jsr.communitech.net/"

news[1]=new Array()
news[1]["text"]="Visit also my site about where I live, Alan\ 's Page - A Guide to Greenwich and Charlton"
news[1]["link"]="http://ourworld.compuserve.com/homepages/apalmer/"

/*Dont change anything below this!
*********************************************************************************/
fadeInit=new Function("oNews=new makeObj('divNews','divCont'); fadeNews(0)")
function makeObj(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'
this.css=(n) ? eval(nest+'document.'+obj):eval(obj+'.style')
this.writeref=(n) ? eval(nest+'document.'+obj+'.document'):eval(obj);
this.fadeIt=b_fadeIt
this.obj = obj + "Object"; eval(this.obj + "=this")
}
function b_fadeIt(text,link,font,size,speed,fn,num,c0,c1,c2,c3,c4,c5,c6){
if(num<arguments.length && arguments[num]!=0){
writetext='<a href="'+link+'" style="text-decoration:none; font-size:'+size+'px">'
+'<font face="'+font+'" color="'+arguments[num]+'">'+text+'</font></a>'
if(n){this.writeref.write(writetext); this.writeref.close()}
if(ie) this.writeref.innerHTML=writetext
num++
setTimeout(this.obj+'.fadeIt("'+text+'","'+link+'","'+font+'",'+size+','+speed+',"'
+fn+'",'+num+',"'+c0+'","'+c1+'","'+c2+'","'+c3+'","'+c4+'","'+c5+'","'+c6+'")',speed)
}else setTimeout('eval('+fn+')',betweendelay)
}
function fadeNews(num){
if(num<news.length){
fn=fadeback?'fadeBack('+num+')':'fadeNews('+(num+1)+')';
oNews.fadeIt(news[num]["text"],news[num]["link"],FontFace,FontSize,100,fn,7,
colors[0],colors[1],colors[2],colors[3],colors[4],colors[5],colors[6])
}else if(loop)fadeNews(0)
}
function fadeBack(num){
if(num>=0){
oNews.fadeIt(news[num]["text"],news[num]["link"],FontFace,FontSize,100,'fadeNews('+(num+1)
+')',7,colors[6],colors[5],colors[4],colors[3],colors[2],colors[1],colors[0])
}
}
onload=fadeInit;
/*End of fadescript
**********************************************************************************/
</script>
<body>
<div id="divCont" style="position:absolute; width:250; height:200; left:15; top:120">
<div id="divNews" style="position:absolute">
<script>//We gotta write something here so netscape will make it
//be the correct size, but we will only write if it's a 4.x browser
if(document.all || document.layers) document.write("dummy text, dummy"
+"text, you can place you fist news or a welcome msg or something here."
+"If you place these layers inside a table or something you can also"
+"use this as the msg that browsers that doesn't suport dhtml will see.")
</script>
</div>
</div>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
Các liên kết xoay vòng tròn

<html>
<head>
<title>JavaScript Resources - Flying Links</title>
<style>
.fly {
font-family: Arial, Helvetica;
font-size: large;
color: #0000ff;
position: absolute;
visibility: hidden;
z-index: 2;
}

.logo {
font-family: Zap-Chance, cursive;
font-size: xx-large;
color: #ff0000;
position: absolute;
top: 0px;
left: 30px;
visibility: visible;
z-index: 1;
}

.desc {
text-align: center;
font-family: Arial, Helvetica;
color: #cc6699;
position: absolute;
top: 220px;
left: 40px;
width: 400px;
visibility: hidden;
z-index: 0;
}
</style>
<script type="text/javascript" language="JavaScript">


/* Show an object */
function showObject(object) {
object.visibility = VISIBLE;
}

/* Hide an object */
function hideObject(object) {
object.visibility = HIDDEN;
}

/* Slide the company logo from top to middle */
function slideLogo(from, to) {
if (from < to) {
company.top = (from += 10);
setTimeout('slideLogo(' + from + ',' + to + ')', 75);
}
else initObjects();
}

/* Rotate selected objects */
function rotateObjects() {
for (var i = 0; i < pos.length; i++) {
pos += inc; objects.visibility = 'visible';
objects.left = (r * Math.cos(pos)) + xoff
objects.top = (r * Math.sin(pos)) + yoff;
}
rotateTimer = setTimeout("rotateObjects()", 75);
}

/* Initialize selected objects for rotation */
function initObjects() {
/* Here is the array of HTML elements that will be rotated, from fly1 to fly4
Just put the shortcut variables to the HTML elements in this little array
and they will be rotated automatically */
objects = new Array(fly1, fly2, fly3, fly4);
pos = new Array();
pos[0] = 0;
for (var i = 1; i < objects.length; i++) {
pos = parseFloat(pos[i - 1] + ((2 * pi) / objects.length));
}
rotateObjects();
}

/* Variables for rotating objects */
var objects;
var pos;
var r = 160; // radius
var xoff = 180; // x offset
var yoff = 170; // y offset
var pi = Math.PI; // get pi
var inc = pi / 180; // degrees per rotation cycle
var objects; // objects to be rotated
var pos; // position for objects

</script>

<SCRIPT LANGUAGE="JavaScript">

<!--
function exit() {
if (window.name == "") {
// top.location.href = url;
} else {
//top.opener.top.location.href = url;
top.close();
}
}
//-->

</SCRIPT>
</head>
<body bgcolor="#ffe4c4" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<div id = "fly1" class = "fly">
<a href = "contents.htm" onMouseOver = "showObject(desc1)" onMouseOut = "hideObject(desc1)">Introduction</a><br>
</div>
<div id = "fly2" class = "fly">
<a href = "navigationaids.htm" onMouseOver = "showObject(desc2)" onMouseOut = "hideObject(desc2)">Navigation Aids</a><br>
</div>
<div id = "fly3" class = "fly">
<a href = "coloursandgraphics.htm" onMouseOver = "showObject(desc3)" onMouseOut = "hideObject(desc3)">Colours and Graphics</a><br>
</div>
<div id = "fly4" class = "fly">
<a href = "funstuff.htm" onMouseOver = "showObject(desc4)" onMouseOut = "hideObject(desc4)">Fun Stuff</a><br>
</div>
<div id = "company" class = "logo">JavaScript Resources</div>
<div id = "desc1" class = "desc">
Introduction and links
</div>
<div id = "desc2" class = "desc">
Aids to Web site navigation
</div>
<div id = "desc3" class = "desc">
Playing with colours and images
</div>
<div id = "desc4" class = "desc">
Games, quizzes, etc.
</div>
<script type="text/javascript" language="JavaScript">

/* Simple version detection */
var isNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4);

/* They can be used in place
of hidden and visible because on occasion Navigator has problems with the two */
var HIDDEN = (isNS) ? 'hide' : 'hidden';
var VISIBLE = (isNS) ? 'show' : 'visible';

/* Create shortcut variables for different absolutely positioned elements */
var fly1 = (isNS) ? document.fly1 : document.all.fly1.style;
var fly2 = (isNS) ? document.fly2 : document.all.fly2.style;
var fly3 = (isNS) ? document.fly3 : document.all.fly3.style;
var fly4 = (isNS) ? document.fly4 : document.all.fly4.style;
var company = (isNS) ? document.company : document.all.company.style;
var desc1 = (isNS) ? document.desc1 : document.all.desc1.style;
var desc2 = (isNS) ? document.desc2 : document.all.desc2.style;
var desc3 = (isNS) ? document.desc3 : document.all.desc3.style;
var desc4 = (isNS) ? document.desc4 : document.all.desc4.style;

/* Begin the sliding of the company logo */
slideLogo(0, 140);
</script>
<div id="footer+text" style="position: absolute; left:200; top: 370"><layer name="footer+text" left=200 top=370><form>
<input type=button value="Close Window" onClick="exit();">
</form> </layer></div>
</body>
</html>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
Một dạng đồng hồ khác trên trang web

<body onLoad="show5()">
<span id="liveclock" style="position:absolute;left:10;top:10;">
</span>
<script language="JavaScript">
<!--
/*Upper Corner Live clock script credit: Website Abstraction (www.wsabstract.com) More free scripts here!
*/
function show5(){
if (!document.layers&&!document.all)
return
var Digital=new Date()
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 size='3' face='Arial' ><b><font size='1'>Current Time:</font></br>"+hours+":"+minutes+":"
+seconds+" "+dn+"</b></font>"
if (document.layers){
document.layers.liveclock.document.write(myclock);
document.layers.liveclock.document.close();
}
else if (document.all){liveclock.innerHTML=myclock;}
setTimeout("show5()",1000);
}
//-->
</script>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
Chuyển đổi các đơn vị đo chiều dài

<script language="JavaScript" type="text/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 centimeter, and then it converts the unit fram centimeterto

other units.*/

function nofocus()

{

document.convert.InUnit.focus()

}

var cmValue = 1

var mValue = 100

var kmValue = 100000

var inValue = 2.54000843476

var ftValue = 30.4801012183

var ydValue = 91.440275784

var miValue = 160934.708789

function toCM()

{

var i = document.convert.unit.selectedIndex

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

if (thisUnit == "CM")

{

document.convert.cm.value = document.convert.InUnit.value

}

else if(thisUnit == "M")

{

document.convert.cm.value = document.convert.InUnit.value * mValue

}

else if(thisUnit == "KM" )

{

document.convert.cm.value = document.convert.InUnit.value * kmValue

}

else if(thisUnit == "IN" )

{

document.convert.cm.value = document.convert.InUnit.value * inValue

}

else if(thisUnit == "FT" )

{

document.convert.cm.value = document.convert.InUnit.value * ftValue

}

else if(thisUnit == "YD" )

{

document.convert.cm.value = document.convert.InUnit.value * ydValue

}

else if(thisUnit == "MI" )

{

document.convert.cm.value = document.convert.InUnit.value * miValue

}

toAll()

}

function toAll()

{

var m = document.convert.cm.value

document.convert.m.value = m / mValue

document.convert.km.value = m / kmValue

document.convert.inch.value = m / inValue

document.convert.ft.value = m / ftValue

document.convert.yd.value = m / ydValue

document.convert.mi.value = m / miValue

}
//-->
</script>
<div align="center"><h1>Length Converter</h1></div>
<p>Simply choose the unit you want to use, type the value in the field next to it, and click the 'Convert' button.</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="CM">Centimetre
<option value="M">Metre
<option value="KM">Kilometre
<option value="IN">Inch
<option value="FT">Foot
<option value="YD">Yard
<option value="MI">Mile
</select>
</td>
<td>
<input type="text" name="InUnit" size="20" maxlength="20" value="0">
</td>
</tr>
<tr>
<td>
Centimetre: </td>
<td>
<input type="text" name="cm" size="20" maxlength="20" value="0" onFocus="nofocus()">
</td>
</tr>
<tr>
<td>
Metre:
</td>
<td>
<input type="text" name="m" size="20" maxlength="20" value="0" onFocus="nofocus()">
</td>
</tr>
<tr>
<td>
Kilometre: </td>
<td>
<input type="text" name="km" size="20" maxlength="20" value="0" onFocus="nofocus()">
</td>
</tr>
<tr>
<td>
Inch: </td>
<td>
<input type="text" name="inch" size="20" maxlength="20" value="0" onFocus="nofocus()">
</td>
</tr>
<tr>
<td>
Foot: </td>
<td>
<input type="text" name="ft" size="20" maxlength="20" value="0" onFocus="nofocus()"> </td>
</tr>
<tr>
<td>
Yard: </td>
<td>
<input type="text" name="yd" size="20" maxlength="20" value="0" onFocus="nofocus()">
</td>
</tr>
<tr>
<td>
Mile: </td>
<td>
<input type="text" name="mi" size="20" maxlength="20" value="0" onFocus="nofocus()">
</td>
</tr>
<tr>
<td align="center">
<input type="Reset" value="Start Over">
</td>
<td align="center">
<input type="button" value="Convert" onClick="toCM()">
</td>
</tr>
</table>
</form>
</div>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
Tạo một menu list

<script language="JavaScript">

<!-- Begin
function go_to_station() {
if (document.stationform.stationselect.options[0].selected) {
window.location.href = "http://www.shop4all.com";}
else if (document.stationform.stationselect.options[1].selected) {
window.location.href = "http://www.coomedia.com";}
else if (document.stationform.stationselect.options[2].selected) {
window.location.href = "http://www.microsoft.com";}
else if (document.stationform.stationselect.options[3].selected) {
window.location.href = "http://www.yahoo.com";}
else if (document.stationform.stationselect.options[4].selected) {
window.location.href = "http://www.netscape.com";}
else if (document.stationform.stationselect.options[5].selected) {
window.location.href = "http://msdn.microsoft.com";}
return true;
}
function textValue() {
var stationInteger, stationString
stationInteger=document.stationform.stationselect.selectedIndex
stationString=document.stationform.stationselect.options[stationInteger].text
document.stationform.stationtext.value = "Go to " + stationString +"!"
}
// End -->
</script>
<body>
<center>
<table align="center" bgcolor="#b8860b" cellspacing="2" cellpadding="2" border="2">
<tr>
<td align="center">
<table border="0" cellspacing="2" cellpadding="2" align="CENTER" valign="MIDDLE" bgcolor="#deb887"><tr><td align="CENTER" valign="MIDDLE"><form name="stationform">
<select name="stationselect" onchange="textValue()" multiple size="5">
<option>Shopping Home Page
<option>BDG Home Page
<option>Microsoft Home Page
<option>Yahoo
<option>Netscape
<option>Developer's Page
</select></td></tr>
<tr><td align="CENTER" valign="MIDDLE">
<input type="button" name="stationbutton" value="Go!" onclick="go_to_station()">
</td></tr>
<tr><td align="CENTER" valign="MIDDLE"><input type="text" name="stationtext" value="" size="35" maxlength="35">
<p>
</form></td></tr></table></td>
</tr>
</table></center>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
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>

Chán đời đi lang thang !
Đăng nhập để trả lời
0
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>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
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>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
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>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
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>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
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>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
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>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
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);">
Chán đời đi lang thang !
Đăng nhập để trả lời
0
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>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
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>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
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>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
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>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
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>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
Đồ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>
Chán đời đi lang thang !
Đăng nhập để trả lời
0
anh oi chi lun chổ để coy đoạn code đó chứ
anh giup di
em làm cho nay nè
www.nguyenthuonghien.net.tf
Đăng nhập để trả lời
0
Chào racrui!
Bạn muốn đưa một đọan JavaScripts vào trang Web thì cứ việc copy và dán thôi. Nếu sử dụng FrontPage, bạn vào Insert - Advanced - HTML, dán đoạn mã vào. Bạn chú ý có thể có một số đoạn cần dán vào thẻ </head>
Chúc bạn thành công nha.
Chán đời đi lang thang !
Đăng nhập để trả lời
0
Cái này e thấy trong http://javascriptbank.com cũng có mà:D
Đăng nhập để trả lời
0
Tôi muốn học thiết kế web và là tự học . Tôi không biét chút xíu gì về thế` nào và làm sao có một trang web cho mình, nếu như có rồi thì làm sao thực hiện ? mod có thể hướng dẩn giúp được không ? chẳn hạn nên mua sách nào để coi và dể thực hiện . Tôi nhìn vào các đoạn mả trên mà bù trất ....hic hic [:(]
Đăng nhập để trả lời
0
Chào bạn binhphuong,
sweet cũng giống như bạn vậy, mới đầu thì ko biết thế nào là web. Bây h học rùi thì biêt sơ sơ thui[:D]
Bạn có thể viết đc 1 trang web bằng font page, macro. dreamveaver hoặc thậm chí là notepad (nhưng rất khó[8|]).
Bạn muốn học thiết kế web thì nên bắt đầu với macromedia dreamwever, giao diện thân thiện, khá dễ làm để thấy đẹp[:)], ... Sau khi làm xong, bạn kiếm cái host free nào đó up lên thử (chẳng hạn như summerhost.info)
Còn về các đoạn script trên thì bạn hải có kiến thức cơ bản về các dòng lệnh, thẻ thì mới hiểu đc, vả lại cũng hiếm người muốn hỉu chi cho mệt (nó đã đc người ta làm sẵn, mình chỉ chép vô là chạy). Sách thì vô số, mình ko dám có ý kiến[&:]
Bình luận văn học: http://diendan.vnthuquan.net/tt.aspx?forumid=242
New app for Windows Phone 8: Location Reminder
http://diendan.vnthuquan.net/tm.aspx?high=&m=792697&mpage=1#792697
Đăng nhập để trả lời
0
@sweet : Bạn muốn học thiết kế web thì nên bắt đầu với macromedia dreamwever, giao diện thân thiện, khá dễ làm để thấy đẹp[:)], ... Sau khi làm xong, bạn kiếm cái host free nào đó up lên thử (chẳng hạn như summerhost.info)
cho mình hỏi, học thiết kế web có ebook nào dạy không, nếu có bạn cho mình để mình học hỏi, thân.
Hot site:
http://www.freehost4v.com
http://www.blogtinhoc.net
http://www.down4v.com
Đăng nhập để trả lời
0
Nói thật với bạn, mình ko có dùng ebook để học thiết kế web, nên mình ko biết. nếu bạn đọc tiếng Anh tốt thì có thể sẽ dễ dàng kiếm được sách.
Chúc bạn may mắn![:D]
Bình luận văn học: http://diendan.vnthuquan.net/tt.aspx?forumid=242
New app for Windows Phone 8: Location Reminder
http://diendan.vnthuquan.net/tm.aspx?high=&m=792697&mpage=1#792697
Đăng nhập để trả lời
0
«« « 1 2 » »»