<iframe/>或者<frame>里面用主页面的东西,就是top.xxx 如: <script> function func(){ ... }; </script> <input type='text' id='t' /> <iframe scr='a.html'/> //a.html简单内容如下 <script> top.document.getElementById('t').value; //在a.html中取input的值 top.func(); //在a.html中执行func() </script>
JS中的top
最新推荐文章于 2023-08-29 15:25:26 发布