Javascript examples for DOM Event:oninvalid
The oninvalid event occurs when a submittable <input> element is invalid.
Bubbles | No |
---|---|
Cancelable | Yes |
Supported HTML tags: | <input> |
<!DOCTYPE html> <html> <body> <form action="/action_page.php" method="get"> Name: <input type="text" oninvalid="console.log('You must fill out the form!');" name="fname" required> <input type="submit" value="Submit"> </form>//from www.jav a 2s . c o m </body> </html>