blob: 9946b680de16c233afb29f4be768639c4084873d [file] [log] [blame]
<!DOCTYPE html>
<title>id and name attributes and getElementById</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-id-attribute">
<link rel="stylesheet" href="/resources/testharness.css">
<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>