Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>id and name attributes and getElementById</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<div id="test">
<div name="abcd"></div>
<p name="abcd" id="abcd"></p>
</div>
<script>
test(function() {
assert_equals(document.getElementById("abcd").nodeName, "P");
assert_equals(document.getElementById("abcd").localName, "p");
});
</script>