Categories

Dec 4, 2019 in JavaScript
Q:

How To Write A Script For "select" Lists Using Javascript

1 Answer

Dec 4, 2019
1. To remove an item from a list set it to null

mySelectObject.options[3] = null;

2. To truncate a list set its length to the maximum size you desire

mySelectObject.length = 2;

3. To delete all options in a select object set the length to 0.

mySelectObject.leng
Click here to read more about JavaScript
Click here to read more about Insurance

Related questions

Madanswer
Dec 4, 2019 in JavaScript
Dec 4, 2019 in JavaScript
Oct 19, 2019 in JavaScript
...