Why is NodeList undefined in IE6/7?
<form action="/" method="post" id="testform">
<input type="checkbox" name="foobar[]" value="1" id="" />
<input type="checkbox" name="foobar[]" value="2" id="" />
<input type="checkbox" name="foobar[]" value="3" id="" />
</form>
<script type="text/javascript" charset="utf-8">
(function () {
var el = document.getElementById('testform')['foobar[]']
if (el instanceof NodeList) {
alert("I'm a NodeList");
}
})();
</script>
This works in FF3/Safari 3.1 but doesn't work in IE6/7. Anyone have any ideas how to check if el is an instance of NodeList across all browsers?