I\'m using a select tag in a form I\'m making that allows multiple selections, but I want to make the maximum amount of selections upto 10. Is this possible using javascript
var is = 0;
for (var i = 0; i < selectCountryCode.length; i++) {
if (selectCountryCode.options[i].selected) {
is++;
}
if (is > 3) {
selectCountryCode.options[i].selected = false;
}
}