On-click Select Box Link using Javascript - Mostlikers

09 January, 2013

On-click Select Box Link using Javascript

This concept based on select box given link just using below  java script function on select box option value. choose the option values link will be load automatically without using submit action link will be loaded on the page follow the below coding avoid to <a> link tag on select box.

1.Give the select box option values

<option value="">Select our search </option>

2.Give the link in Option Value 

<option onclick="window.location='www.google.com' " value="Home">
3.Run the Coding Watch live Demo

<option value="">Select our search </option> 
<option onclick="window.location = 'http://www.google.com'">Google</option>
<option onclick="window.location = 'http://www.yahoo.com'">Yahoo</option> 
<option onclick="window.location = 'http://www.gmail.com'">Gmail</option> 

4.This Live Demo work Firefox,Opera Browsers Only

Live Demo :

No comments:

Post a Comment