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是自定義屬性

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM