skip to Main Content

How can I remove the “onclick” CSS property from all buttons on the website?

function myFunction() { document.getElementById('img'); const element = document.styleSheets[0].cssRules[0].style.removeProperty('content'); } img { content: url("https://static.vecteezy.com/system/resources/previews/005/476/277/original/under-18-forbidden-round-icon-sign-illustration-eighteen-or-older-persons-adult-content-18-plus-only-rating-isolated-on-white-background-free-vector.jpg"); max-width: 100%; height: auto; } <button onclick="myFunction()">Show pics</button> <img src="https://m.media-amazon.com/images/I/81K2hJBAduL.png"> The point is that after clicking on the "delete" button, the "content" property for the entire website.

VIEW QUESTION
Back To Top
Search