How to check content of button with JS in if function – Html
I'm trying to check if button contains certain string when I click on it, and if it contains, for example "text1" I want to replace it with "text2" and vice versa. Thank you in advance. Edit: To simplify everything, how…