87,997
社区成员




<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<script type="text/javascript">
var pWin = window;
window.onload = function(){
pWin = window.opener ? window.opener.getTopWindow() : pWin;
};
function getTopWindow(){
return pWin;
}
function openWin(){
window.open(window.location.href);
if(window.opener)
{
window.close();
}
}
function show(){
getTopWindow().document.getElementById("t").innerHTML = new Date().toLocaleString();
}
</script>
<div id="t"></div>
<input type="button" value=" 新建窗口 " onClick="openWin()" />
<input type="button" value=" 第一个窗口刷新时间 " onClick="show()" />
</body>
</html>
<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<script type="text/javascript">
var pWin = window;
window.onload = function(){
pWin = window.opener ? window.opener.getTopWindow() : pWin;
};
function getTopWindow(){
return pWin;
}
function openWin(){
window.open(window.location.href);
}
function show(){
getTopWindow().document.getElementById("t").innerHTML = new Date().toLocaleString();
}
</script>
<div id="t"></div>
<input type="button" value=" 新建窗口 " onClick="openWin()" />
<input type="button" value=" 第一个窗口刷新时间 " onClick="show()" />
</body>
</html>
<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<script type="text/javascript">
var pWin = window.opener ? window.opener.getTopWindow() : window;
function getTopWindow(){
return pWin;
}
function openWin(){
var win = window.open(window.location.href);
(function(){
if(win.getTopWindow){
window.close();
}else{
setTimeout(arguments.callee, 100);
}
})();
}
function show(){
getTopWindow().document.getElementById("t").innerHTML = new Date().toLocaleString();
}
</script>
<div id="t"></div>
<input type="button" value=" 新建窗口 " onClick="openWin()" />
<input type="button" value=" 第一个窗口刷新时间 " onClick="show()" />
</body>
</html>
<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<script type="text/javascript">
function openWin(){
window.open(window.location.href);
}
function show(){
var obj = window;
while(obj.opener){
obj = obj.opener;
}
obj.document.getElementById("t").innerHTML = new Date().toLocaleString();
}
</script>
<div id="t"></div>
<input type="button" value=" 新建窗口 " onclick="openWin()" />
<input type="button" value=" 第一个窗口刷新时间 " onclick="show()" />
</body>
</html>
<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<script type="text/javascript">
var nIndex = 1;
window.onload = function(){
nIndex = window.opener ? window.opener.getIndex() + 1 : 1;
document.getElementById("t").innerHTML = getIndex();
};
function getIndex(){
return nIndex;
};
function openWin(){
window.open(window.location.href);
}
</script>
<div id="t"></div>
<input type="button" value=" Open " onclick="openWin()" />
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script>
function myRef(){
window.open(''+self.location,'mywin','left=20,top=20,width=500,height=500,toolbar=1,resizable=0');
myRef.focus()
}
</script>
</head>
<body>
<form>
<input type=button value="Open new window" onClick="myRef()" />
</form>
</body>
</html>
<script>
var index=window.location.search.split("=")[1]|0;
document.write(index);
function openWin(){
window.open("photo1.html?index=" +(index+1),"_blank");
}
</script>
<a href="javascript:openWin();">open<a/>
<script>
var index=window.location.search.split("=")[1]|0;
document.write(index);
function openWin(){
window.open("photo2.html?index=" +(index+1),"_blank");
}
</script>
<a href="javascript:openWin();">open<a/>
<script type="text/javascript">
var i=1;
function openWin(){
window.open("photo1.html?index="+(i++),"_blank");
}
</script>
<a href="javascript:openWin();">open<a/>
<script>
document.write(window.location.search.split("=")[1]);
</script>