crop_rotate
Run
<!DOCTYPE html> <html> <body> <h2>JavaScript Validation</h2> <p>Enter a number and click OK:</p> <input id="id1" type="number" max="100"> <button onclick="myFunction()">OK</button> <p>If the number is greater than 100 (the input's max attribute), an error message will be displayed.</p> <p id="demo"></p> <script> function myFunction() { let text; if (document.getElementById("id1").validity.rangeOverflow) { text = "Value too large"; } else { text = "Input OK"; } document.getElementById("demo").innerHTML = text; } </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxib2R5Pg0KDQo8aDI+SmF2YVNjcmlwdCBWYWxpZGF0aW9uPC9oMj4NCg0KPHA+RW50ZXIgYSBudW1iZXIgYW5kIGNsaWNrIE9LOjwvcD4NCg0KPGlucHV0IGlkPSJpZDEiIHR5cGU9Im51bWJlciIgbWF4PSIxMDAiPg0KPGJ1dHRvbiBvbmNsaWNrPSJteUZ1bmN0aW9uKCkiPk9LPC9idXR0b24+DQoNCjxwPklmIHRoZSBudW1iZXIgaXMgZ3JlYXRlciB0aGFuIDEwMCAodGhlIGlucHV0J3MgbWF4IGF0dHJpYnV0ZSksIGFuIGVycm9yIG1lc3NhZ2Ugd2lsbCBiZSBkaXNwbGF5ZWQuPC9wPg0KDQo8cCBpZD0iZGVtbyI+PC9wPg0KDQo8c2NyaXB0Pg0KZnVuY3Rpb24gbXlGdW5jdGlvbigpIHsNCiAgbGV0IHRleHQ7DQogIGlmIChkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgiaWQxIikudmFsaWRpdHkucmFuZ2VPdmVyZmxvdykgew0KICAgIHRleHQgPSAiVmFsdWUgdG9vIGxhcmdlIjsNCiAgfSBlbHNlIHsNCiAgICB0ZXh0ID0gIklucHV0IE9LIjsNCiAgfSANCiAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoImRlbW8iKS5pbm5lckhUTUwgPSB0ZXh0Ow0KfQ0KPC9zY3JpcHQ+DQoNCjwvYm9keT4NCjwvaHRtbD4=