想点击按钮弹出一个小窗口,可是在firefox中是以新的标签页显示的,显示的好大。这个问题如何解决,我就想让他在文本框上弹个小框。

解决方案 »

  1.   

    Syntax:var WindowObjectReference = window.open(strUrl, strWindowName [, strWindowFeatures]); 
    var WindowObjectReference;
    var strWindowFeatures = "menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes";
    function openRequestedPopup()
    {
      WindowObjectReference = window.open("http://www.cnn.com/",
    "CNN_WindowName", strWindowFeatures);
    }var WindowObjectReference;function openRequestedPopup()
    {
      WindowObjectReference = window.open("http://www.domainname.ext/path/ImageFile.png",
                      "DescriptiveWindowName",
                      "resizable=yes,scrollbars=yes,status=yes");
    }
      

  2.   

    请注意,已经发现FireFox下关于window.open的一个bug:
    Bug 176320: Minimal innerWidth/innerHeight values for popup windows