tags:

views:

149

answers:

2

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

+1  A: 

Using Protoype, you can do this:

$$('select').length
Lucas Jones
+4  A: 

Using plain javascript:

document.getElementsByTagName('select').length

Using jQuery:

$('select').length
Greg
Can't get any simpler that this. +1
jimyshock