When running Windows Internet Explorer 10 in Compatibility View, getAttribute may return null. For example, consider the following sample HTML:
In this example, the use of the custom HTML attribute with the name "required" in an INPUT tag results in the following error:
<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>
Value of required invalid, expecting "no" got "null".