欢迎来到福编程网,本站提供各种互联网专业知识!

JS是否可以跨文件同时控制多个iframe页面的应用技巧

发布时间:2007-12-16 作者: 来源:转载
有个办法,建议你的有连接的iframe改成include包含的文件,然后记得把文件名改成shtml,或者asp.代码如下:复制代码代码如下:无标题文档functionchange(){vara=document.getElementById("iframea");varb=document.getElementById("iframeb");a.setAttribute(
有个办法,建议你的有连接的iframe改成include包含的文件,然后记得把文件名改成shtml,或者asp.代码如下:

复制代码 代码如下:




无标题文档



functionchange(){
vara=document.getElementById("iframea");
varb=document.getElementById("iframeb");
a.setAttribute("src","http://www.163.com");
b.setAttribute("src","http://www.sina.com");
}




>




被包含的文件代码:

其中内容点击链接更新两个iframe

相关推荐