msCapsLockWarningOff property
Turns automatic caps lock warning on or off for validated password input fields.
This property is read/write.
Syntax
JavaScript |
---|
object.msCapsLockWarningOff = bCapsLockWarning bCapsLockWarning = object.msCapsLockWarningOff |
Property values
Type: boolean
FALSE (false)
Default. Automatic caps lock warning is turned on.
TRUE (true)
Automatic caps lock warning is turned off.
Remarks
Starting with Internet Explorer 10, input type=password fields will automatically display a warning if the caps lock is on. To turn off the automatic caps lock warning, use the msCapsLockWarningOff property on the document object. See the following example.
Examples
<html>
<head>
<title>msCapsLockWarningOff example</title>
<script type="text/javascript">
function capsOff() {
if (document.msCapsLockWarningOff == false) {
document.msCapsLockWarningOff = true;
document.getElementById("caps").innerHTML = "Warning off";
} else {
document.msCapsLockWarningOff = false;
document.getElementById("caps").innerHTML = "Warning on";
}
}
</script>
</head>
<body>
<label>Type a password: <input type="password" /></label><br />
<button id="caps" onclick="capsOff();">Warning off</button>
</body>
</html>