Thứ Năm, 12 tháng 5, 2016

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.


    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

0 nhận xét:

Đăng nhận xét

Popular Posts

Tìm kiếm Blog này

Được tạo bởi Blogger.

Morning Charts 07/01/2019 SPX