+ 3
How does JavaScript work in HTML Tags to Alert or Prompt in a <form> or <input /> submit or verify button?
This is a newbie question! I've been learning HTML and JavaScript for a while, but I have not been applying the knowledge coding. Question: How can I apply JavaScript to HTML code? for example the <form> and <input /> Tag, Let's say I want to alert "Thank you!" after the person Clicks on "Submit" or "Verify" it should alert ( "Thank You!"). How can I go about it? Thanks for you answers...
2 ответов
+ 14
With minimal code ( require to be completed ):
<form>
<input type="submit" onclick="alert('thank you!');">
</form>
+ 2
Thanks a lot @visph