window.open('a.htm','name','');
name 和当前窗口的name一样的话,就在当前窗口打开

解决方案 »

  1.   

    什么阿
    难道只会用DW吗?那么罗里罗唆的一大片
    <select name=address1 size=1 style="width:120 " onchange=aa(this.options[this.selectedIndex].value)>
      <option value=http://www.fmprc.gov.cn selected>aaa</option>
      <option value=http://www.sdpc.gov.cn>bbb</option>
     </select>
    <script>
    function (url)
    {
       window.location.href=url
    }
    </script>
      

  2.   

    谢谢楼上2位.
    to mingxuan3000(铭轩):
    看了一下front page的解释:
    String specifying the name of the window. This name is used for TARGET on a FORM or an A.
    用alert(window.name);看了一下,form的名字是空的.不知道如何定义这个属性.
    是否可以在 MM_jumpMenu3强制定义window.name = "form_name";
    不过试了一下,不行.to hanpoyangtitan(韩波洋):
    您的方法是可行的,但是.
    1,我要用按钮来实现,所以要用onsubmit,而不是onchange
    2,我要在同一窗口打开新的url,而不是开一个新的窗口,所以window.open也不是很符合要求.
    That's all.
      

  3.   

    补充:
    to hanpoyangtitan(韩波洋):
    您的方法在onchange可行,但是在onsubmit就不行.
    That's all.
      

  4.   

    <select name=address1 id=address1 size=1 style="width:120 ">
      <option value="http://www.fmprc.gov.cn" selected>aaa</option>
      <option value="http://www.sdpc.gov.cn">bbb</option>
     </select>
    <input type="submit" onclick="javascript:a();" value="go"/>
    <script>
    function a()
    {
       window.location.href=document.getElementById("address1").value;
    //window.location.replace(document.getElementById("address1").value);
    }
    </script>
    ========================================
    http://peipei3000.jishuqi.com/reg.asp
    http://www.goofar.com/?ID=634664011139
    ========================================
      

  5.   

    楼上正解.
    虽然不明白为什么要getElementById,return false才能实现预期的要求.
    谢谢.
    That's all.
      

  6.   

    document.part1_form.address1.value应该也可以的,
    只是用getElementById,用id来区别,唯一,好一点========================================
    http://peipei3000.jishuqi.com/reg.asp
    http://www.goofar.com/?ID=634664011139
    ========================================