1.htm<script language="javascript">function test(){alert("测试")}</script>---------------------------------------------2.htm<input type="button" onclick="parent.frame1.test()">