Chủ đề tổng hợp

header ads

Tạo Drop menu đơn giản (chèn vào tiện ích Htlm)

<!--Example drop down menu 1-->
<form name="form1">
<select name="select1" size="1" style="background-color:#FFFFD7" onchange="displaydesc(document.form1.select1, thetext1, 'textcontainer1')">
<option selected value="" />Flickr - Seowood
<option value="" />Flickr - Sotay
<!--Facebook -->
<option value="" target="newwin" />Facebook - <br/> vanghepnamtrung
<option value="" target="newwin" />Facebook - vansangotunhiengocaosu

<!--Twitter -->
<option value="" />Twitter - goxesay
<!--Tumblr -->
<option value="" />Tumblr - marketsupplies
<!--Wordpress -->
<option value="" target="newwin" /> - 1phut30giay
<!--Ten mien tieng viet -->
<option value="http://www.b-lố" target="newwin" />b-lố
<option value="" target="newwin" />Coding Forums
<!--Trang ban hang-->
<option value="" target="newwin" /> - vuthanhtrungyh
<option value="" target="newwin" /> - 0968970650
<option value="" target="newwin" />
<option value="" target="newwin" />

<option value="" target="newwin" /> - jesujuda/article

<!--Nhắn Tin Đăng quảng cáo search từ khóa Jesujuda-->
<option value="
" target="newwin" /> - Nam Trung JSC
<option value="
" target="newwin" /> - Nam Trung JSC
<option value="" target="newwin" /> - Nam Trung JSC



<input type="button" value="Go"
onclick="jumptolink(document.form1.select1)" /><br />
<span id="textcontainer1" align="left" style="font:italic 13px Arial">
<!--Example drop down menu 2-->
<form name="form2">
<select name="select2" size="1" style="background-color:#E3FFDF" onchange="displaydesc(document.form2.select2, thetext2, 'textcontainer2')">
<option selected value="" />CNN
<option value="" />MSNBC
<option value="" />BBC News
<option value="" />The Register
<input type="button" value="Go"
onclick="jumptolink(document.form2.select2)" /><br />
<span id="textcontainer2" align="left" style="font:italic 13px Arial">

<!--IMPORTANT: Below script should always follow all of your HTML codes above, and never proceed them-->
<!--To be safe, just add below script at the end of your page-->
<script type="text/javascript">
* Drop down menu w/ description- (c) Dynamic Drive (
* This notice must stay intact for use
* Visit for full source code
var thetext1=new Array()
thetext1[0]="Flickr Seowood"
thetext1[1]="Flickr Sotay"

/// You may define additional text arrays if you have multiple drop downs:
var thetext2=new Array()
thetext2[0]="CNN- US and World News."
thetext2[1]="MSNBC- NBC News online."
thetext2[2]="BBC News- Updated every minute of every day."
thetext2[3]="TheRegister- Daily IT news."
// Now, see 2) below for final customization step
function displaydesc(which, descriptionarray, container){
if (document.getElementById)
function jumptolink(what){
var selectedopt=what.options[what.selectedIndex]
if (document.getElementById && selectedopt.getAttribute("target")=="newwin")
//2) Call function displaydesc() for each drop down menu you have on the page
// This function displays the initial description for the selected menu item
// displaydesc(name of select menu, name of corresponding text array, ID of SPAN container tag):
// Important: Remove the calls not in use (ie: 2nd line below if there's only 1 menu on your page)
displaydesc(document.form1.select1, thetext1, 'textcontainer1')
displaydesc(document.form2.select2, thetext2, 'textcontainer2')

Đăng nhận xét

0 Nhận xét

An tâm mua sắm tại nhà - giao hàng tận nơi - chẳng lo về giá

Shop tại nhà