This article mainly introduces the JS function of moving the left list to the right list. The main function is to add the contents of the left drop-down box to the right drop-down box, support multi-select movement, and simultaneously move the right drop-down box object. In addition, friends who need it can refer to the following
to implement the function:
1. The content of the drop-down box on the left is added to the drop-down box on the right, supporting multi-select movement, and at the same time Remove the drop-down box object on the right;
2. Supports moving the upper and lower positions of items in the list;
3. The rendering is as follows:
Html code
选择下拉菜单 选定一项或多项然后点击添加或移除(按住shift或ctrl可以多选),或在选择项上双击进行添加和移除。
The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.
Related articles:
Using ajax and history.pushState to change the page URL without refreshing Example_AJAX related
About Ajax A 3-point summary of technical principles_AJAX related
AJAX encapsulated class usage guide
The above is the detailed content of JS realizes the function of moving the left list to the right list. For more information, please follow other related articles on the PHP Chinese website!