Form Select Box To Goto New Page

[Total: 0    Average: 0/5]

This shows how to use a form select box to choose a new location to goto on the web.

Body Code:

<script type=text/javascript>
function doIt(_l) { document.location=_l; }
<form name=exf1>
<select name=sel1 size=1>
  <OPTION VALUE="">JS-Examples Home Page
  <OPTION VALUE="">JS-Examples Index
  <OPTION VALUE="">Ball Gif
<input type=button value="Go!" onClick="doIt(this.form.sel1.options[this.form.sel1.selectedIndex].value)">

Times Viewed: 1

Leave a Reply

Your email address will not be published. Required fields are marked *