akbarkhan95a
Posts: 1
Joined: Thu Dec 15, 2016 1:45 pm

How to remove attributes?

Thu Dec 15, 2016 1:49 pm

Assume I have the following HTML source code:



<img onload="..." ... someotherattr="..." ...> ... </img>



How can I remove the two attributes "onload" and/or "someotherattr" but not all other (possibly existing) attributes?



Can I put the remove command for the two attributes into one statement or do I have to setup two commands (for one attribute per command)?



jQuery can be used if it is simpler



Thank you

Read more at W3schools

Return to “Java”