how to remove all attributes from with js or jquery. (I don't know what is the attributes in the body, i want remove all them)
As of ES2015, you can use Array.from().
const el = document.body;
const attributes = Array.from(el.attributes);
attributes.forEach(attr => el.removeAttributeNode(attr));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With