Monday, June 29, 2015

How to write a script for "Select" lists using javascript



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

No comments:

Post a Comment

What is restrict option in directive?

The restrict option in angular directive, is used to specify how a directive will be invoked in your angular app i.e. as an attribute, class...