अवलोकन
oninvalid इवेंट तब ट्रिगर होता है जब <input> फ़ील्ड का मान अमान्य होता है (उदाहरण: आवश्यक फ़ील्ड खाली)।
उदाहरण
<!DOCTYPE html> <html> <body> <script> function resetFunct() { alert("The form was reset"); } </script> <form> Enter Name: <input type="text" required oninvalid = "alert('Fill the form before submitting!');" > <br> Enter birth month: <input type= "text"> <br> <input type = "submit"> <input type = "reset"> </form> </body> </html>