1News Online:
Home » » Tutorial Blog - How to Create a Dropdown Menu

Tutorial Blog - How to Create a Dropdown Menu

Monday, October 15, 2012 | 2:17 AM

Dropdown menus can reduce the space used in a blog post to put the various links. Among the dropdown menu use is to put a link friends ², reference links, links and other tips.

Examples are the following dropdown menu

Cara Buat Dropdown Menu

Tutorial to make a dropdown menu is as follows.

1. Login to your blogger account, from the dashboard> layout> page elements> add a gadget> HTML / javascript

2. Copy the following code in the textbox html / javascript.

<select onChange="document.location.href=this.options[this.selectedIndex].value;">
<option selected>Tajuk</option>
<option value="Link 1">Text 1</option>
<option value="Link 2">Text 2</option>

Link 1: Add a link to open
Text 1: Enter word / sentence to link

If you want to enter more menus, just copy paste <option value="Link 2"> Text 2 </ option> and place it before the </ select>
3. When finished, save your work. :)

For the above code, when the link will be opened on the same page. To open a link in page / different window, just change the code:

<select onChange="document.location.href=this.options[this.selectedIndex].value;">

kepada kod ini.

<select onchange="javascript:window.open(this.options[this.selectedIndex].value);">

Kongsi artikel ini : :

Post a Comment

Copyright © 2012. 1News Online - All Rights Reserved
Proudly powered by Blogger