Thursday, October 11, 2012

Dropdown - On change redirect to another page

Drop down - On change redirect to another page 


visitors to go to a particular page when they select any option from the dropdown list or from select box  which will redirect users to the particular url when the select any option from it.

<html>
</body>
<select name="test" onchange="gotourl(this.value)">
<option value="#">Select the Site </option>
<option value="http://www.google.com/">Google</option>
 <option value="http://www.yahoo.com/">Yahoo</option>
<option value="http://wintekweb.blogspot.com/2012/05/simple-counter-php.html/">Wintekweb</option>
</select>
<script language="JavaScript" type="text/javascript">
function gotourl(url){
 window.location= url;
}
</script>
</body>
</html>

No comments:

Post a Comment