Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
54
rated 0 times [  58] [ 4]  / answers: 1 / hits: 59027  / 14 Years ago, thu, january 6, 2011, 12:00:00

How can i dynamically remove all options of a drop down box in javascript?


More From » javascript

 Answers
33
document.getElementById('id').options.length = 0;


or



document.getElementById('id').innerHTML = ;

[#94346] Wednesday, January 5, 2011, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
neildrews

Total Points: 166
Total Questions: 103
Total Answers: 85

Location: Moldova
Member since Sat, Aug 6, 2022
2 Years ago
neildrews questions
Fri, Feb 18, 22, 00:00, 2 Years ago
Tue, Oct 12, 21, 00:00, 3 Years ago
Tue, Mar 23, 21, 00:00, 3 Years ago
Sun, Aug 16, 20, 00:00, 4 Years ago
;