<form id="f1" name="f1" method="post" action="">
  <input name="text" type="text" id="text" value="" size="100" />
  <label>
    <input name="b2" type="submit" id="b2" onclick="MM_openBrWindow('document.f1.text','newwindow','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes')" value="GO" />
  </label>
</form>
有错吗?为什么我无法实现这个功能?

解决方案 »

  1.   

        <input name="b2" type="submit" id="b2" onclick="MM_openBrWindow(document.f1.text.value,'newwindow','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes')" value="GO" />
      

  2.   

    'document.f1.text' --> document.getElementById('text').value
      

  3.   

    不认识MM_openBrWindow函数,内部构造不清楚。
      

  4.   

    因为函数MM_openBrWindow没有定义
      

  5.   

    看下你的MM_openBrWindow这个函数是否有定义啊?!
      

  6.   

    like...
    function MM_openBrWindow(url,name,args){
       window.open(url,name,args); // or something else
    }
      

  7.   

    MM_openBrWindow(document.f1.text.value,'newwindow','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes')