Select all values from list box in a single click using javascript
The following example code will help you to select all or deselect all the items from list box using javascript code.
Example Program:- (Editor)
Editor is Loading...
Advertisement
function listboxSelectDeselect(listID, isSelect) {
var listbox = document.getElementById(listID);
for (var count = 0; count < listbox.options.length; count++) {
listbox.options[count].selected = isSelect;
}
}
Example Program:- (Editor)
Editor is Loading...
Advertisement
Nhận xét
Đăng nhận xét