Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

HTML attribute "required" is invalid in Windows Internet Explorer 10 Compatibility View


View products that this article applies to.

Summary

When running Windows Internet Explorer 10 in Compatibility View, getAttribute may return null. For example, consider the following sample HTML:

<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<title>Test Page</title>
</head>
<body>
<input type="checkbox" id="check" required="no">
<script language="javascript">


if (document.getElementById('check').getAttribute('required') !='no')
alert('Value of required invalid, expecting "no" got "' + document.getElementById('check').getAttribute('required') + '"');
else
alert('Required is OK');

</script>
</body>
</html>
In this example, the use of the custom HTML attribute with the name "required" in an INPUT tag results in the following error:
 
Value of required invalid, expecting "no" got "null".



↑ Back to the top


More Information

Microsoft is currently investigating this issue and will provide updates as more information becomes available. NOTE: This problem does not occur in earlier version of Windows Internet Explorer.


↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 2811765
Revision : 1
Created on : 1/7/2017
Published on : 2/11/2013
Exists online : False
Views : 318