怎样判断在点击一个连接的时候打开一个新的窗口判断,是否已经打开了该窗口? 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;} 一个html与js的用法 使用JS怎么抓取其他网站的页面? 小问题一个~!请指教~! 求救! 空间被挂<script>木马 怎么解决 十万火急! js如何获得firefox中的xml 请问一个正则表达式的写法 难阿!!怎样隐藏radion,checkbo的边框和select列表的下拉箭头?? 用JS如何实现如下功能? 如何统计在线时间? 我不懂.htc文件?(在线) 怎样在文本框中比较两个日期的大小 请问: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;
}