代码编辑器:
x
1
<p><a id="myAnchor" href="https://www.twle.cn">访问简单教程</a></p>
2
<script>
3
var x=document.getElementById("myAnchor");
4
document.write(x.id);
5
</script>
6
<p><a id="myAnchor" href="https://www.twle.cn">访问简单教程</a></p>
<script>
var x=document.getElementById("myAnchor");
document.write(x.id);
</script>