removeAttribute do not return true or false

Posted by Sourabh on Stack Overflow See other posts from Stack Overflow or by Sourabh
Published on 2010-05-17T13:02:53Z Indexed on 2010/05/17 13:11 UTC
Read the original article Hit count: 198

Filed under:

Hi , I am trying to remove attributes of a DOM element using below statement in javascript.

var res = nodes.removeAttribute("style");

but the res is always "undefined" it seems that the removeAttribute function does not return anything (I tested it on firefox browser)

How can I identify that the attribute is successfully removed or not ?

Thanks, Sourabh

© Stack Overflow or respective owner

Related posts about JavaScript