JS 触发不同ifram控件,实现刷新,关闭标签(H+框架)

例:

 

//前台页面事件处理模块
var EventOperation = {
Refresh: function (data_id) {
var a = (window.top);
var ele = a.document.querySelectorAll('[data-id="' + data_id + '"]')[1];
ele.contentWindow.document.getElementById("btnSelect").click();
}
}

 

使用: 

//刷新

EventOperation.Refresh("/StockManage/PurchaseList");     

 

 

//关闭标签  自定义属性data-id 为(/StockManage/InsertPurEdit)

$(".J_menuTab[data-id='/StockManage/InsertPurEdit']", window.top.document).find(".fa.fa-times-circle").click();

 

//关闭当前标签

$(".J_menuTab.active", window.top.document).find(".fa.fa-times-circle").click();

 

 

注:data-id  ifram是自定义属性

 

posted @ 2018-07-18 17:20  z_handsome  阅读(1316)  评论(0编辑  收藏  举报