Run
Online Code Editor
JavaScript setAttribute() method
It is an example to update an attribute's value using the setAttribute() method.
Click the follwing button to see the effect.
Change