js调用父级frame中的方法

父级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();

posted @ 2017-04-17 20:54  lytwajue  阅读(1461)  评论(0编辑  收藏  举报