使用zTree复选框树,非异步通信方式,form表单POST提交数据
最近使用zTree做了一个树形选择的元素的程序,由于表单中有一些其它不便使用异步通信的元素,而zTree本身又不会生成checkbox,所以只能自己想办法做,查了一下官方的guide,自己写了写,好歹实现了,思路就是当点击树的时候,判断是否为选中状态,如果是的话
最近使用zTree做了一个树形选择的元素的程序,由于表单中有一些其它不便使用异步通信的元素,而zTree本身又不会生成checkbox,所以只能自己想办法做,查了一下官方的guide,自己写了写,好歹实现了,思路就是当点击树的时候,判断是否为选中状态,如果是的话,往一个div中追加一个隐藏表单,如果为非选中状态时,就遍历该div,把之前追加的那个隐藏表单remove掉。代码如下:
HTML代码如下:
效果如下
原文地址:使用zTree复选框树,非异步通信方式,form表单POST提交数据, 感谢原作者分享。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

WebStorm Mac version
Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download
The most popular open source editor