Jika anda beri tanda centang yang ada dibawah Drop Down, URL akan terbuka di tab baru.
Demo :
Cara membuatnya
Dari Dashboard >> Design >> Edit HTML.
Penempatannya
dibawah <body>
........
diatas </body>
<form name="mycombowopt">
<select name="example" size="1">
<option value="http://nanoyulianto.blogspot.com/">Blog Nano Yulianto</option>
<option value="http://nanoyulianto.blogspot.com/2011/01/tutorial-kode.html">Tutorial Kode</option>
<option value="http://nanoyulianto.blogspot.com/2011/01/tips-trik-tutorial-blogger.html">Tutorial Blogger</option>
</select>
<input type="button" value="Go" onClick="gothere()"/><br/>
<p><input type="checkbox" name="windowoption" value="on" /> Open New Tabs</p>
</form>
<script type='text/javascript'>
//<![CDATA[
/*
Drop Down terbuka di tab baru By JavaScript Kit (http://www.javascriptkit.com/script/script2/combocheck.shtml)
*/
function gothere(){
var thebox=document.mycombowopt
if (thebox.windowoption.checked){
if (!window.newwindow)
newwindow=window.open("")
newwindow.location=
thebox.example.options[thebox.example.selectedIndex].value
}
else
location=
thebox.example.options[thebox.example.selectedIndex].value
}
//]]>
</script>
Jika ingin ditambah :
<option value="URL anda">Judulnya</option>
Credit : JavaScript Kit
Alhamdulillah
0 comments:
Posting Komentar