How to give the links to selectbox options (dropdown list)

This very simple javascript tips to create a links to the select box(dropdown box) text. This is also very useful when create branches in websites you can use this type of select box with links. This type of concept is mostly used for responsive menu or mobile menu. 

The below example shows how to set the links to the select box options text. Just put the  onchange="location = this.value;" put this code into select tag and give the links in to the value section. The below image show how the textbox looks like. check the below demo page how it works.

Code for give links to the dropdown list or selectbox

<title>How to add links in select box</title>
<h1>How to add links in select box</h1>
<select name="forma" onchange="location = this.value;">
<option value="">Dropdown Button</option>
<option value="">404 Error Page</option>
<option value="">Mobile Toggle Menu</option>
<option value="">Simple Overlay Effect</option>

Post a Comment