I have select box
<select id="abc">
<option value="1">xyz</option>
<option value="2">pqr</option>
</select>
Through third party javascript, it is removing all options
document.getElementById("abc").options.length=1; // third party code
Now how do i retain those options again ,as i can see them in the browser page source. How to do this through javascript/jquery? is this possible? can someone help.
Thanks
You could store a clone of those options. With this:
Then, to restore them, you can do:
Hope this helps. Cheers