2007-11-23

Simple redirect dropdown list

浪花 | SpoonDrift


If you want a simple dropdown list redirecting users when they select an option, you can use a javascript code like this:



  1. <select onChange='location=this.options[this.selectedIndex].value'>

  2. <option selected>pick one</option>

  3. <option value='http://www.google.com'>google</option>

  4. <option value='http://www.yahoo.com>yahoo</option>

  5. </select>

No comments: