<html> 
<head> 
<script type="text/javascript"> 

function say() { 
alert("parent2.php------>I'm at parent2.php"); 
} 

function callChild() 
{ 
//document.frames["myFrame"].window.say();//只适用于ie浏览器 
myFrame.window.say(); 
myFrame.window.document.getElementById("button").value="我变了";

} 
</script> 
</head> 

<body> 
<input type=button value="调用child.html中的函数say()" onclick="callChild()"> 
<iframe name="myFrame" src="child2.php"></iframe> 
</body> 
</html> 
<?php?>