To implement data movement between two drop-down boxes, add
$(' #add').click(function(){
var $options = $('#select1 option:selected'); //Get the selected item
var $remove = $options.remove();
$remove.appenTo('#select2');
});
Simplified as follows
$('#add').click(function(){
var $options = $('#select1 option:selected'); //Get the selected item
$remove.appenTo('#select2');
});
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn