.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

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -