コンボボックス↓を使って新しいページを開きます。
選択したサイトが新しいウィンドウで開かれます。ソースは次のようになっています。
<html> <head> <title>コンボボックスを使用してページを開く(新しいウィンドウ)</title> <script language="JavaScript"> <!-- function LinkSelect(form, sel) { c = sel.selectedIndex; adrs = sel.options[c].value; if (adrs != "-" ) { LinkWin=window.open("","NewPage","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=600,height=600"); LinkWin.location.href=adrs; } } //--> </script> </head> <body> <select name="select1" onChange="LinkSelect(this.form, this)"> <option value="-" selected>---Please Select---</option> <option value="http://www.microsoft.com">microsoft</option> <option value="http://www.yahoo.co.jp">yahoo! japan</option> <option value="http://www.ntt-west.co.jp">ntt west</option> </select> </body> </html> |
太字の部分を好きなURLと名前に変えて使用してください。もちろん項目を増やす事だってできます。