1.htm
----------
<html>
<head>
<script>
var count=0;
function Counter()
{
document.getElementById("ShowCounter").innerText = ++count;
}
</script>
</head>
<body onload="Counter()">
<p id="ShowCounter"></p>
<p><a href="2.htm" target="_blank">打开2.htm</a></p>
</body>
</html>
2.htm<BR>
在2.htm中通过window.opener能够控制到1.htm中的所有对象<BR>前提2.htm必须是由1.htm打开的
-----------
<script>
if(window.opener != null)
{
window.opener.Counter();
}
</script>