怎样判断在点击一个连接的时候打开一个新的窗口判断,是否已经打开了该窗口? window.open("test1.htm","onlyone","");window.open("test2.htm","onlyone","")window.open("test3.htm","onlyone","")window.open("test4.htm","onlyone","") 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你用 window.open 来打开窗口, 只要每个 window.open 里的第二个参数一样, 那么只会打开一个窗口, 后面的只会重载新窗口.<a href=aa.htm target=hrong onclick="self.blur(); window.open('','hrong').focus()">测试</a><br><a href=bb.htm target=hrong onclick="self.blur(); window.open('','hrong').focus()">测试</a><br><a href=cc.htm target=hrong onclick="self.blur(); window.open('','hrong').focus()">测试</a><br> 子窗口:<body onload="window.opener.sonOpened = true">父窗口通过window.sonOpened判断子窗口是否完全打开 var oSon = window.open("test1.htm","onlyone","width=200,height=200");//记录子窗口oSon.window.location = "test2.htm";//在同一个子窗口打开另一个页面 我的打开操作是一个javascript函数实现的。function openwin4scroll(url,winName,,width,height) { xposition=0; yposition=0; if ((parseInt(navigator.appVersion) >= 4 )) { xposition = (screen.width - width) / 2; yposition = (screen.height - height) / 2; } theproperty= "width=" + width + "," + "height=" + height + "," + "location=0," + "menubar=0," + "resizable=0," + "scrollbars=1," + "status=0," + "titlebar=0," + "toolbar=0," + "hotkeys=0," + "screenx=" + xposition + "," //仅适用于Netscape + "screeny=" + yposition + "," //仅适用于Netscape + "left=" + xposition + "," //IE + "top=" + yposition; //IE //window.open( url,winName,theproperty ); newwin=window.open('','',theproperty ); newwin.location.href =url; return false;}这个需要如何修改??? 我怎么用函数openwin4scroll就不能实现只打开一个子窗口呢? function openwin4scroll(url,winName,,width,height) { xposition=0; yposition=0; if ((parseInt(navigator.appVersion) >= 4 )) { xposition = (screen.width - width) / 2; yposition = (screen.height - height) / 2; } theproperty= "width=" + width + "," + "height=" + height + "," + "location=0," + "menubar=0," + "resizable=0," + "scrollbars=1," + "status=0," + "titlebar=0," + "toolbar=0," + "hotkeys=0," + "screenx=" + xposition + "," //仅适用于Netscape + "screeny=" + yposition + "," //仅适用于Netscape + "left=" + xposition + "," //IE + "top=" + yposition; //IE //window.open( url,winName,theproperty ); newwin=window.open('','winName',theproperty ); ~~~~~~`~ newwin.location.href =url; return false;} 怎样让IE9运行兼容模式 淘宝购物时选择地区的效果如何实现? 一个js字体变换 关于javascript下拉菜单 parent和iframe之间的传值问题.请大家帮忙. 两个小问题,一个很简单~~~~~~~~~~ 一个简单的问题 jquery-fileupload应用于spring mvc后台应该返回什么样的一个值。在线等。。。 显示倒计时之后弹出层 html文件双击可正常使用,放到服务器下就不正常 怎样在文本框中比较两个日期的大小 请问:JAVASCRIPT中可以用HASH表不?要不行,怎么进行下面的操作?
<a href=bb.htm target=hrong onclick="self.blur(); window.open('','hrong').focus()">测试</a><br>
<a href=cc.htm target=hrong onclick="self.blur(); window.open('','hrong').focus()">测试</a><br>
<body onload="window.opener.sonOpened = true">父窗口通过window.sonOpened判断子窗口是否完全打开
//记录子窗口oSon.window.location = "test2.htm";
//在同一个子窗口打开另一个页面
function openwin4scroll(url,winName,,width,height) {
xposition=0; yposition=0;
if ((parseInt(navigator.appVersion) >= 4 )) {
xposition = (screen.width - width) / 2;
yposition = (screen.height - height) / 2;
}
theproperty= "width=" + width + ","
+ "height=" + height + ","
+ "location=0,"
+ "menubar=0,"
+ "resizable=0,"
+ "scrollbars=1,"
+ "status=0,"
+ "titlebar=0,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xposition + "," //仅适用于Netscape
+ "screeny=" + yposition + "," //仅适用于Netscape
+ "left=" + xposition + "," //IE
+ "top=" + yposition; //IE
//window.open( url,winName,theproperty );
newwin=window.open('','',theproperty );
newwin.location.href =url;
return false;
}
这个需要如何修改???
xposition=0; yposition=0;
if ((parseInt(navigator.appVersion) >= 4 )) {
xposition = (screen.width - width) / 2;
yposition = (screen.height - height) / 2;
}
theproperty= "width=" + width + ","
+ "height=" + height + ","
+ "location=0,"
+ "menubar=0,"
+ "resizable=0,"
+ "scrollbars=1,"
+ "status=0,"
+ "titlebar=0,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xposition + "," //仅适用于Netscape
+ "screeny=" + yposition + "," //仅适用于Netscape
+ "left=" + xposition + "," //IE
+ "top=" + yposition; //IE
//window.open( url,winName,theproperty );
newwin=window.open('','winName',theproperty );
~~~~~~`~
newwin.location.href =url;
return false;
}