Skip to content

Tag: html

Javascript Unerror method using another js file

<img src=”images/business-card.webp” onerror=”this.onerror=null; this.src=’images/business-card.jpg’ ” class=”m-auto img-fluid”> I want to write this feature from within js file. How can i do it ? Answer First, create the image in javascript: Now, add an o…