代码如下:
<html>  
<head>  
<title>Page A</title>  
<script>   
    var getValue=function(){   
        alert(window.frames['frame1'].document.getElementById('mytext').value);    
    }   
</script>  
</head>  
<body>      <iframe id="frame1" name="frame1" width="300" height="300"  src="http://127.0.0.1/b.html"></iframe> 
<form method="post">
    <input type="text" id="mytext" value="I'm page A"/>
         <button onclick="getValue()">获取子窗口属性</button>  
    </form>

</body>  
</html>