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>
<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 !
![[:(]](/images/smiley/s7.gif)
![[:D]](/images/smiley/s2.gif)
).
, ... 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)![[&:]](/images/smiley/s5.gif)