`

iframe中子窗体调用父窗体的方法

 
阅读更多

 

比如一个框架使用使用iframe。 左侧的iframe中.需要调用父窗体的方法;

 

//关闭左侧菜单;
function menu_close(){
 window.parent.menu_setProperties();
}

function menu_setProperties(){
 //在这里可以对父窗体中的表单或者属性进行操作;
 var menu= jQuery("#leftMenuID").parent();
 jQuery(menu).fadeOut(200);
 jQuery("#imgButton").get(0).src="/shopping/images/leftMenuHide.jpg";
}

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics