Here, the best method for javascript change image onclick event. Remove the semicolon after change(), there should not be any in the content). You don't need javascript: in an onClick - only in a href="javascript:", you can change <"span"> with <"div"> or <"p"> . any tag that allows you to write a code inside, https://en.wikipedia.org/wiki/Unobtrusive_JavaScript, https://stackoverflow.com/a/3910750/4812515, Microsoft Azure joins Collectives on Stack Overflow.

Changing the text of a submit button when clicked can be useful if you are writing an AJAX application or you know that there will be some sort of delay. change button text on click w3schools May 21, 2022 by hereford zone schools Then In the Home tab locate the Font group. It matches the selector element.