This article mainly introduces how to obtain zTree selected nodes on the parent page. the instance analyzes the zTree operation skills for nodes, which is of great practical value, for more information about how to obtain zTree selected nodes on the parent page, see the examples in this article. Share it with you for your reference. The details are as follows:
Put the zTree in an iframe:
ZTreeObj = $ ("# treeDemo"). zTree (setting, zNodes );
If you are on the current page
Var nodes = zTreeObj. getCheckedNodes ();
You can.
Then, click the button on the parent page to obtain the node selected in zTree?
Assume that the id and name of iframe are aa (both id and name are set, and there is a compatibility problem)
Window. frames ['A']. window. zTreeObj. getCheckedNodes ();
You can.
I hope this article will help you design javascript programs.