Answers for "text input onsubmit"

3

onsubmit in html

<form onsubmit="myFunction()">
  Enter name: <input type="text">
  <input type="submit">
</form>

<script>
function myFunction() {
  alert("The form was submitted");
}
</script>
Posted by: Guest on May-21-2021

Browse Popular Code Answers by Language