js点击按钮打开一个新的网页、传参和不传参获取下拉列表的值并弹出

 <form id="form1" name="form1" method="post" action="">
    <input type="hidden" value="TPU 宝瑄" name="protitle" id="protitle" />
    <label>
      <input type="submit" name="button" id="button" onClick="window.open('3.html','blank_','scrollbars=yes,resizable=no,width=650,height=450')" value="在线订购" />

    </label>
<script >
function m(){
var o=document.getElementById("s").value;
alert(o);
}
function n(x){
alert(x);
}
</script>
<select name="s" id="s" onchange="m()">
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
</select>
<select name="ss" id="ss" onchange="n(this.options[this.options.selectedIndex].value)">
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
</select>
  </form>

by 雪洁 2009-11-26 11:36:53 6660 views
我来说几句

相关文章