.removeAttribute in Javascript fails -
Let me give the ID to all & lt; Td> whose name is "Date is []", because if I keep the ID, a jquery datepicker gets spoiled later
id
< The following function is used to remove p> document.getElementsByName ('date []'). RemoveAttribute ('id');
Firebug tells me: TypeError: document.getElementsByName (...). Remove translation is not a function
I have tried all combinations of and , and instead of date date also. I do not think there is a typo because I have copied it from w3schools
document.getElementsByName returns a collection, you have to repeat it and remove it:
store = document.getElementsByName ('date []'); (Var i = 0; i & lt; collection.length; i ++) {collection [i] .removeAttribute ('id');}
Comments
Post a Comment