Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
12-03-2005, 08:01 AM #1
- Join Date
- Sep 2005
- Thanked 0 Times in 0 Posts
removing elements from an objectHTMLCollection
I have an array of input objects, and need to remove some depending on the value of their attributes. When I try inputArray.splice(), however, I am told that that is not a function. How do I remove elements from an objectHTMLCollection?
*MUST work in IE; FF would be nice too (but not necessary)
12-03-2005, 08:27 AM #2
HTMLCollection.prototype.splice = Array.prototype.splice
Might actually make it work in Firefox. More generally, however, say:
var collection = [object HTMLCollection] // reference to your collection
// delete the 6th element