Reputation: 267
I have an asp page in which the are number of listboxes.I want to count the number of listboxes using Javascript and also there is another requirement,i want to disable all the listboxes in that form
Upvotes: 1
Views: 4697
Reputation: 321786
Using plain javascript:
document.getElementsByTagName('select').length
Using jQuery:
$('select').length
Upvotes: 6