例:
//前台页面事件处理模块
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是自定义属性