@Ludzikk
Posted
Hello, i don't know why button didn't worked for you. I did copy your code to test it and button tag work completly fine.
I have just one suggestion about one thing in your js code.
emailInput.style.border = '1px solid hsl(4, 100%, 67%)';
emailInput.style.backgroundColor = 'rgba(255, 87, 135, 0.1)';
emailInput.style.color = 'hsl(4, 100%, 67%)';
Im not a big fan of styling by this way, it would be more simple by adding all of these to css class and then toggle that class when u need it.
@yogskr
Posted
@Ludzikk It did work the first time I used the <button>
tag. But when I opened the project via GitHub Pages, the page keeps refreshing when I clicked on the button. It did show the custom error message and the success message box, yet only momentarily.
Also, thanks for the suggestion!