Drop Down dengan deskripsi

Jika anda memilih, akan muncul keterangan didalam text area.



Demo :





Cara membuatnya

Dari Dashboard >> Design >> Edit HTML.

Penempatannya
dibawah <body>
........
diatas </body>

<div>
<form name="combowithtext">
<select name="example" size="1" onChange="showtext()">
<option value="http://nanoyulianto.blogspot.com/">Blog Nano Yulianto</option>
<option value="http://nanoyulianto.blogspot.com/2011/01/tips-trik-tutorial-blogger.html">Tutorial Blogger</option>
<option value="http://nanoyulianto.blogspot.com/2011/01/tutorial-kode.html">Tutorial Kode</option>
</select>
<input type="button" value="Go!"
onClick="gothere()"/><br/>
<textarea rows="5" cols="21" wrap="virtual" name="text"></textarea>
<script type='text/javascript'>
//<![CDATA[

/*
Drop Down dengan Deskripsi By JavaScript Kit (http://www.javascriptkit.com/script/script2/combodescrip1.shtml)
*/

var shortcut=document.combowithtext
var descriptions=new Array()

//Dekripsinya :
descriptions[0]="Semua informasi tentang Blogger."
descriptions[1]="Tutorial Blogger untuk pemula"
descriptions[2]="Dasar-dasar kode HTML, XHTML, dan CSS."


shortcut.text.value=descriptions[shortcut.example.selectedIndex]
function gothere(){
location=shortcut.example.options[shortcut.example.selectedIndex].value
}

function showtext(){
shortcut.text.value=descriptions[shortcut.example.selectedIndex]
}

//]]>
</script>
</form>
</div>



Credit : JavaScript Kit

Alhamdulillah

0 comments:


Posting Komentar


Creative Commons License
Drop Down dengan deskripsi by Nano Yulianto is licensed under a Creative Commons Attribution 3.0 Unported License.
Based on a work at http://nanoyulianto.blogspot.com/2011/01/drop-down-dengan-deskripsi.html.
Permissions beyond the scope of this license may be available at http://nanoyulianto.blogspot.com/.