设置title var oWin=window.open(sUrl,"_blank",sConfig); oWin.document.title="you title";
出于安全原因, 现在好多浏览器都要显示url的~
弹出浮动层中的某个区域中显示window.open窗口,以前看过这样的代码
添加延时就可以了 <input type="button" id="txt1" value="打开" onclick="openWin()"/> <script type="text/javascript"> function openWin(){ var sUrl=""; var oWin=window.open(sUrl,"_blank","width=500,height=300"); var scanFun=function(){ if(oWin.document){ oWin.document.title="123"; window.clearInterval(scanInterval); } } var scanInterval=window.setInterval(scanFun,200); } </script>
如果在参数立设置location=yes,那么url就不显示了,
但这样又不符合我的目的了。
急呀!!!
var oWin=window.open(sUrl,"_blank",sConfig);
oWin.document.title="you title";
<input type="button" id="txt1" value="打开" onclick="openWin()"/>
<script type="text/javascript">
function openWin(){
var sUrl="";
var oWin=window.open(sUrl,"_blank","width=500,height=300");
var scanFun=function(){
if(oWin.document){
oWin.document.title="123";
window.clearInterval(scanInterval);
}
}
var scanInterval=window.setInterval(scanFun,200);
}
</script>
window._open=window.open;
window.open=function(sURL,sName,sFeatures){
var win=window._open(sURL,sName,sFeatures);
if(!win){
alert('你的浏览器禁用了弹出窗口,请取消后重新登录!');
location.href="index.php";
return false;
}
win.document.title='我的标题';
return true;
}
function openN(URL){
window.open(URL,'_blank','status=yes,scrollbars=yes,resizable=yes');
window.opener=null;
window.close();
}
我测试这个问题非常麻烦。
因为我的ie打开的网页本身就没有那个url,
还得去同事的电脑上测试。就是不行呀。
<script type="text/javascript">
function openWin(){
var sUrl="xx.asp";
var oWin=window.open(sUrl,"_blank","width=500,height=300");
if(oWin.document){
oWin.document.title="我的窗口标题";
}
}
</script>我测试可是没有任何问题的你复制回去看看
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>JS函数实现鼠标指向图片后显示大图</title>
<script language="javascript">
function showPic(sUrl){
var x,y;
x = event.clientX;
y = event.clientY;
document.getElementById("Layer1").style.left = x;
document.getElementById("Layer1").style.top = y;
document.getElementById("Layer1").innerHTML = "<img src=\"" + sUrl + "\">";
document.getElementById("Layer1").style.display = "block";
}
function hiddenPic(){
document.getElementById("Layer1").innerHTML = "";
document.getElementById("Layer1").style.display = "none";
}
</script>
</head>
<body>
<div id="Layer1" style="display:none;position:absolute;z-index:1;"></div>
<img src="/images/logo.gif" onmouseout="hiddenPic();" onmousemove="showPic(this.src);" />
<p></p>
</body>
</html>
看到红色部分了吗?
我的版本是6.0.3790.3959,我的不会显示url。
我同事的ie都是6.0.2900,他们的都会显示那个url。
我的版本6.0.2900.2180
俺经理说,你必须把那个url去掉,如果url不去掉,就把你去掉
挤出去就可以了!!
这个方法不行呀。虽然看不见url了,但显示一大窜空格。
你打开g.cn/music,然后随便试听一首歌曲。你看一下那个弹出窗口是否有url。
我的ie不显示那个url,我同事的都显示。
1.window.open命令用于在网页上弹出一个新窗口。2.URLStr:弹出窗口所显示的页面3.WindowName:弹出窗口的名称,可以任意指定,也可以用’’来代替4.Property:用于控制弹出窗口显示的属性,具体可控制的参数有:5.Toolbar:是否显示浏览器工具栏,yes为显示,no为不显示6.Location:是否显示游览器地址栏,yes为显示,no为不显示7.Directories:是否显示目录按钮,yes为显示,no为不显示8.Status:是否显示状态栏,yes为显示,no为不显示9.Menubar:是否显示菜单条,yes为显示,no为不显示10.Scrollbar:是否激活水平和垂直流动条,yes为显示,no为不显示11.Resizable:是否可以改变窗口大小,yes为显示,no为不显示12.Width:指定窗口的宽度,以像素为单位13.Height:指定窗口的高度,以像素为单位14.Left:指定窗口距屏幕左端的距离,以像素为单位15.Top:指定窗口距屏幕顶端的距离,以像素为单位16.screenX:等同于Left属性.17.screenY:等同于Top属性18.fullscreen= { yes/no/1/0 } 是否全屏,默认no19.channelmode= { yes/no/1/0 } 是否显示频道栏,默认no20.directories = { yes/no/1/0 } 是否显示转向按钮,默认no21.scrollbars= { yes/no/1/0 } 是否显示滚动条,默认yes22.resizable= { yes/no/1/0 } 是否窗口可调整大小,默认no23.z-look | yes/no | 窗口被激活后是否浮在其它窗口之上24.alwaysLowered | yes/no | 指定窗口隐藏在所有窗口之后25.alwaysRaised | yes/no | 指定窗口悬浮在所有窗口之上26.depended | yes/no | 是否和父窗口同时关闭27.directories | yes/no | Nav2和3的目录栏是否可见
hotkeys | yes/no | 在没菜单栏的窗口中设安全退出热键
innerHeight | pixel value | 窗口中文档的像素高度
innerWidth | pixel value | 窗口中文档的像素宽度
titlebar | yes/no | 窗口题目栏是否可见