removeAttribute

The removeAttribute() method removes a attribute from a element

Example

document.querySelector("body").removeAttribute("id")

Last updated