The Operation method of realizing left and right permissions by JQUERY
JQUERY implements the operation method of left and right permissions, in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
Code:
$(function () {)
$("# btnright") .click (function () {
$('# selectleft option:selected'). AppendTo ('# selectright')
});
$('# btnleft') .click (function () {
$('# selectleft') .append ($'# selectright option:selected')
});
$('# btnleftall') .click (function () {
$('# selectleft') .append ($'# selectright option')
});
$('# btnrightall') .click (function () {
$('# selectleft option:selected'). AppendTo ('# selectright')
});
});
Beijing
Guangzhou
Shenzhen
Shanghai
Taiyuan
Effect picture:
This is the answer to the question about the operation method of about permissions in JQUERY. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.