[thelist] JavaScript value of text in an option element
fstorr
fffrancis at fstorr.demon.co.uk
Mon Jan 19 12:35:30 CST 2004
Hi all
Using JavaScript I need to validate against the contents of the text in
an <option> element (as opposed to the contents of the value attribute),
and cannot work out how to do it. I've tried various things - .value
gives me the value of the selected value attribute, but if I try
.innerText or .innerHTML I get the values of every <option> element in
the dropdown.
How can I achieve this?
Regards
Francis
More information about the thelist
mailing list