We can make multiple option selected in our HTML form using JavaScript and jQuery.

In Javascript:

document.getElementById('elementId').value = ["optionVal1", "optionVal2", "optionVal3"];

and in Jquery Its pretty:

$("#elementId").val(["optionVal1", "optionVal2", "optionVal3"]);
Advertisements