CSS का उपयोग करें:एक निर्दिष्ट सीमा के बाहर के मान वाले <इनपुट> तत्वों को स्टाइल करने के लिए आउट-ऑफ-रेंज चयनकर्ता।
उदाहरण
आप :आउट-ऑफ़-रेंज चयनकर्ता को लागू करने के लिए निम्न कोड चलाने का प्रयास कर सकते हैं:
<!DOCTYPE html>
<html>
<head>
<style>
input:out-of-range {
border: 3px dashed orange;
background: yellow;
}
</style>
</head>
<body>
<input type = "number" min = "5" max = "10" value = "15">
<p>The style only works for the value entered out of range</p>
</body>
</html>