0

我有一个 Ajax 回调函数,它将加载一个 html 文件并在弹出窗口中弹出这个 HTMl 文件的内容。

到目前为止它有效,但是,我想摆脱弹出窗口中的位置栏。这是我的代码

function _checkPopUpUpdate() { var callback=new Object(); callback.success=this.onExternalSuccess; callback.failure=this.onExternalFailure; YAHOO.util.Connect.asyncRequest('GET','/ci/ajaxCustom/ajaxCheckPopupUpdate',callback); };

函数 onExternalSuccess (o){

if(o.responseText!==undefined)
{
    var str=o.responseText;
    //document.getElementById('updateContent').innerHTML=str;
      if(str !== 'no update') // Then pop up.
      {
      L=screen.width-200;
      T=screen.height;
      **popup=window.open(str,"","alwaysRaised=yes,status=no,toolbar=no,location=no,menubar=no,directories=no,resizable=no,scrollbars=no,height=80,width=210,left="+L+",top="+T);**
      for (i=0;i<200;i++)
      {
         T=T-1;
          popup.moveTo(L,T);
      }
    }
} };

函数 onExternalFailure (o) { alert("fail"); };

所以,我有位置= 0,我认为它应该是正确的。但我仍然在弹出窗口中看到位置栏。

4

1 回答 1

0

有些浏览器不允许您删除它。某些浏览器具有禁用删除它的设置。没有可靠的方法来删除位置栏。您可以在这里测试各种浏览器:http ://www.quirksmode.org/js/popup.html

于 2010-09-21T14:47:37.627 回答