1 在主页面中控制子页面的切换

在主页面中的代码以及DOM

 <script type="text/javascript">

function changeUrl(url) {

            document.getElementById("ifra_operation").src = url;

        }

 </script>

 

  <div >

            <iframe ></iframe>

  </div>

 <input />

2 在子页面中控制另一个子页面的切换

   子页面C.aspx中

  <script type ="text/javascript" >

        function getUrl(url) {

            var anotherFrame = top.parent.document.frames["ifra_operation"];

            anotherFrame.location = url;

        }

 </script>

<input />

相关文章: