This article example describes the method of getting the selected node of zTree on the parent page. Share it for your reference. The details are as follows:
Put zTree in an iframe:
zTreeObj = $("#treeDemo").zTree(setting, zNodes);If on the current page,
var nodes = zTreeObj.getCheckedNodes();
Just
Then, by clicking the button on the parent page, how to get the selected node of zTree?
Assuming that the id and name of the iframe are aa (both id and name are set, compatibility issue)
window.frames['aa'].window.zTreeObj.getCheckedNodes();
Just
I hope this article will be helpful to everyone's JavaScript programming.