//在其中一个frame里操作主窗口
var ff=window.parent.window.document.getElementsByTagName(" frameset");
或
var ff=window.parent.window.document.getElementsByid(" frameset");
//获得frameset上的document对象
ff.contentWindow.document.getElementById('oneElement');
//执行JS
ff.function();
//获得iframe对象 var ff=document.getElementById('iframeOne'); //获得iframe上的document对象 ff.contentWindow.document.getElementById('oneElement');
//执行JS
ff.function();
|
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26308209/viewspace-719757/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26308209/viewspace-719757/