Recently, I used zTree as a program for selecting elements in a tree. Because there are some other elements in the form that are inconvenient to use Asynchronous Communication, and zTree itself does not generate checkbox, I can only do it myself, I checked the official guide and wrote it myself. The idea is to check whether the tree is selected when I click it. If yes
Recently, I used zTree as a program for selecting elements in a tree. Because there are some other elements in the form that are inconvenient to use Asynchronous Communication, and zTree itself does not generate checkbox, I can only do it myself, I checked the official guide and wrote it myself. The idea is to check whether the tree is selected when I click it. If yes
Recently, I used zTree as a program for selecting elements in a tree. Because there are some other elements in the form that are inconvenient to use Asynchronous Communication, and zTree itself does not generate checkbox, I can only do it myself, I checked the official guide and wrote it myself. The idea is to check whether the tree is selected when I click it. If so, append a hidden form to a p object. If the hidden form is not selected, traverse the p object and remove the previously appended hidden form. The Code is as follows:
The HTML code is as follows:
The effect is as follows:
Original article address: Use the zTree checkbox tree for non-asynchronous communication. Use form POST to submit data. Thank you for sharing it.