js使用window.open用select打开新页面

来源:互联网 发布:淘宝女装批发货源 编辑:程序博客网 时间:2024/06/07 03:57

文件名:使用window.open用select打开新页面.html

文件代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>使用window.open打开新页面</title>
<script language= "JavaScript">

function fun(thisurl){
   alert("通过this.value就可以去到Select的值 = "+thisurl);
   window.open(thisurl,"页面标题","width=470,hight=15,scrollbar=yes,resizable=no");
   
}
</script>
</head>
<body>
   <form action="" method="post" name="myform">
    网址:<SELECT name="url" onChange="fun(this.value)">
        <option value ="script_eventform_01.html">EVENT-01</option>
              <option value ="script_eventform_02.html">EVENT-02</option>
              <option value ="script_eventform_03.html">EVENT-03</option>
         </SELECT>
   </form>
</body>
</html>




文件名:script_eventform_03.html

文件代码:

哈哈哈哈哈哈哈哈哈






0 0
原创粉丝点击