Redirect With A Dropdown Menu In JavaScript


SUBMITTED BY: Guest

DATE: June 12, 2013, 1:23 a.m.

FORMAT: JavaScript

SIZE: 568 Bytes

HITS: 1236

  1. <!-- source: http://www.apphp.com/index.php?snippet=javascript-redirect-with-dropdown-menu -->
  2. <script type="text/javascript">
  3. function do_redirect(site){
  4. window.location.href = site;
  5. }
  6. </script>
  7. <select onchange="do_redirect(this.value)">
  8. <option value="#">What site would you like to see?</option>
  9. <option value="http://www.google.com">Google</option>
  10. <option value="http://www.yahoo.com">Yahoo</option>
  11. <option value="http://www.apphp.com">ApPHP</option>
  12. </select>

comments powered by Disqus