日期:2014-05-16  浏览次数:20297 次

高手帮个忙吧~~~~
html <select name="ChangeStatus" style="float:right; margin-right:3px">
  <option value='X'>????</option>
  <option value="pcb_iptrans.html">111</option>
  <option value="tbs_pcb_pcbinfo_idtrans.html">222</option>
  </select>

<input type="button" name="button" value="提交"/>
我想打开 大小不一样的 窗口的话 javascript怎么写哦~~~~帮助~~~~
按111的话打开600*400的
按222的话打开400*200的

------解决方案--------------------
window.open(url,'窗口名称','width=宽,height=搞');
------解决方案--------------------
HTML code
<select name="ChangeStatus" style="float:right; margin-right:3px" onchange = "winopen(this)"> 
         <option value="pcb_iptrans.html"> 111 </option> 
         <option value="tbs_pcb_pcbinfo_idtrans.html"> 222 </option> 
       </select> 
<script>

function winopen(o){
switch(o.selectedIndex){
case 0:width=600,height=400;break;
case 1:width=400,height=200;break;
case 2:width=400,height=200;break;
}

window.open(o.value,o.selectedIndex,"height="+height+",width="+width+"status=yes,toolbar=yes,menubar=yes,location=yes");
}
</script>