<html>
<body>
<p><a id="myAnchor" name="myAnchor" href="http://www.w3school.com.cn">Visit W3School.com.cn</a></p>
<script type="text/javascript">
x=document.getElementById("myAnchor");
document.write(x.name);
</script>
</body>
</html>