Hi,
is there any built in method to clear the contents of a select box using jscript? Do you have to iterate through every element in the list and use remove method?
New to subject.
Thanks
Lenin
Printable View
Hi,
is there any built in method to clear the contents of a select box using jscript? Do you have to iterate through every element in the list and use remove method?
New to subject.
Thanks
Lenin
just set the options.length equal to zero.
form is the form name and select is the name of the select field.Code:document.form.select.options.length=0;