0
function fetchList(ss){
    var select = document.getElementById("storeid"); 
    var options = ss; 
    while (select.options[1]) {
        select.removeChild(select.options[1]);
    }
    for(var i = 0; i < options.length; i++) {
        var opt = options[i];
        var el = document.createElement("option");
        el.textContent = opt;
        el.value = opt;
        select.appendChild(el);   
    }
}

This way I am able to display the list in the drop down,so how can I display check boxes in the options for multiple selection?

Alon Eitan
  • 11,997
  • 8
  • 49
  • 58
DJavaD
  • 39
  • 3
  • https://stackoverflow.com/questions/17714705/how-to-use-checkbox-inside-select-option – Mohit Bumb Dec 14 '18 at 10:03
  • @Mohit Bumb the example is for static ,but I want to create while iterating a list dynamically in drop down box. – DJavaD Dec 14 '18 at 10:08
  • create ul li dynamically with checkbox in it that also dynamically and write css for it and write some js functions to handle their values – Mohit Bumb Dec 14 '18 at 10:11

0 Answers0