1.
1 <%@ page language="java" contentType="text/html; charset=UTF-8" 2 pageEncoding="UTF-8"%> 3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 4 <html xmlns="http://www.w3.org/1999/xhtml" > 5 <head> 6 <title>标题页</title> 7 </head> 8 <body> 9 <script language=JavaScript> 10 function goTo() 11 { 12 13 var myindex=document.myform.mailBox.selectedIndex //获取下拉框中的选择索引 14 location=document.myform.mailBox.options[myindex].value;//获取下拉框的选择值 15 } 16 </script> 17 <form name="myform"> 18 <br /> 19 <select name="mailBox" size=1> 20 <option selected>选项</option> 21 <option value="http://www.163.net">163电子邮局</option> 22 <option value="http://www.263.net">263电子邮局</option> 23 </select><br /> 24 <a href="javascript: goTo()" onMouseOver="self.status='';return true" onMouseOut="self.status='';return true"> 25 <img src="按钮1.gif" border=0 align="middle" style="width: 73px; height: 40px" /></a> 26 </form> 27 </body> 28 </html>