例:
//前臺頁面事件處理模組
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是自定義屬性