$("#" + $("#tabs").find("iframe")[$(".tabs-header ul li").index($('.tabs-selected')) - 1 ].id).contents().find(".search_button").click();
This code gets the tabs currently selected by easyui and triggers the click event of class ".search_button"
$("#tabs").find("iframe")
tabs is the ID of easyui, and tabs load iframe on HTML, so the above code is Get all currently opened tabs
(Every time a tab is opened, there will be one more iframe in the HTML. Similarly, every time a tab is closed, there will be one less iframe in the HTML, dynamically loaded)
$(".tabs-header ul li").index($('.tabs-selected'))
is the index of the currently displayed tabs,
Note : The order of tabs displayed on the page is consistent with the order of iframes on HTML. However, because there is a homepage, the index will be 1 more than the iframe serial number, so it must be reduced by 1
$("# tabs").find("iframe")[$(".tabs-header ul li").index($('.tabs-selected')) - 1]
This way you can get the current The iframe node HTML
of the displayed tabsThe above is the detailed content of Detailed explanation of easyui getting the currently selected tabs instance. For more information, please follow other related articles on the PHP Chinese website!