wysiwyg logo How to handel select option onchange



<select name="aid" size="1" id="aidx">
<option value="1">one</option>
<option value="2">two</option>
<option value="3">tree</option>
<option value="4">four</option>
</select>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>

<script>
// change  url on change the option selected
	$(function(){
	$('#aidx').bind('change', function () {
          var url = $(this).val();
		  url = 'ask.asp?aid=' + url;
          if (url) { // require a URL
              window.location = url;
          }
          return false;
      });
    });
</script>	






xnet 1998 - 2011