親ウィンドウは子ウィンドウに値を割り当てます

3680 ワード

4つのウィンドウ、1つの親ウィンドウ3つのサブウィンドウ、親ウィンドウ3つのサブウィンドウ
3番が親ウィンドウ1、2、4が子ウィンドウ
3番窓口

<HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset= gbk" />
<title> </title>

		<script type="text/javascript">
			window.self.focus();  
  			moveTo(0,0);  
  			window.resizeTo(screen.availWidth,screen.availHeight);
			var main1;
			var main2;
			var main3;
			function openScreen(){
				main1 =  window.open("main1.html","main1","height=600, width=700, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no");
				main2 = window.open("main2.html","mian2","height=600, width=700, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no");
				main4 = window.open("main4.html","main4","height=600, width=700, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no");
			}
			function setScreen1(){
				main1.document.getElementById("span1").innerHTML += " ";
			}
			function setScreen2(){
				main2.document.getElementById("span2").innerHTML += " ";
			}
			function setScreen3(){
				main4.document.getElementById("span4").innerHTML += " ";
			}
		</script>
	<body bgcolor="#EEF6FF" onload="openScreen()">
		3 <br>
		<a onclick="setScreen1()">  " " 1 </a><br>
		<a onclick="setScreen2()">  " " 1 </a><br>
		<a onclick="setScreen3()">  " " 1 </a><br>
	</body>
</html>

1番窓口

<HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset= gbk" />
<title> </title>

		<script type="text/javascript">
			window.self.focus();  
  			moveTo(0,0);  
  			window.resizeTo(screen.availWidth,screen.availHeight);

		</script>
	<body bgcolor="#EEF6FF">
		1 <br><span id="span1" > 3 :</span>
	</body>
</html>

2番窓口

<HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset= gbk" />
<title> </title>

		<script type="text/javascript">
			window.self.focus();  
  			moveTo(0,0);  
  			window.resizeTo(screen.availWidth,screen.availHeight);

			
		</script>
	<body bgcolor="#EEF6FF" >
		2 <br><span id="span2" > 3 :</span>
	</body>
</html>

4番窓口

<HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset= gbk" />
<title> </title>

		<script type="text/javascript">
			window.self.focus();  
  			moveTo(0,0);  
  			window.resizeTo(screen.availWidth,screen.availHeight);

		</script>
	<body bgcolor="#EEF6FF">
		4 <br><span id="span4" > 3 :</span>
	</body>
</html>