1.frame.html

 

<frameset id="fr" rows="50%,50%">
      
<frame name="up" id="up" src="u.html"/>
      
<frame name="down" id="down" src="d.html"/>
</frame>

 


2.u.html

 

代码
<html>
<head>
<script>
function test()
{
  
var objValue=window.parent.frames["down"].document.getElementById("456");
  alert(objValue.value);
}

</script>
</head>
<body>
<input id="123" type="button" value=" 测 试 " onclick="test();"/>
</body>
</html>

 


3.d.html

 

<html>
<head>
</head>
<body>
  <input id="456" type="text" value="456"/>
</body>
</html>

 

 

posted on 2010-04-18 21:13  钱途无梁  阅读(1043)  评论(0编辑  收藏  举报