首页 > Web开发 > 详细

js调用父级frame中的方法

时间:2015-07-03 16:01:18      阅读:288      评论:0      收藏:0      [点我收藏+]

父级frame中的方法:

function hideOutline() {
	$("#outline").hide();
	$("#content").attr("style", "width: 97%;");
	$(".replyUserList").find("table").attr("style", "left: 35px;");
	$("#showOutline").show();
}

子frame中的调用方式:

parent.window.hideOutline();

说明:

调用时window可以省略,比如parent.hideOutline();也可以,而且parent可以有多级,用于有多级frame的情况,比如:parent.parent.hideOutline();

版权声明:本文为博主原创文章,未经博主允许不得转载。

js调用父级frame中的方法

原文:http://blog.csdn.net/zzm628/article/details/46740581

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!