<title>无标题页</title>
</head>
<body>
<div id="roboth"></div>
<script type="text/javascript">
//<![CDATA
//
attributes             elements           NamedNodeMap
var div=document.getElementById("roboth");
alert(div.attributes.getNamedItem(
"id").nodeValue);
alert(div.attributes.item(
0).nodeValue);
alert(div.getAttributeNode(
"id").nodeValue);
alert(div.getAttribute(
"id"))
//]]>
</script>
</body>
</html>

相关文章:

  • 2021-12-27
  • 2021-08-21
  • 2022-12-23
  • 2021-12-27
  • 2021-12-05
  • 2021-08-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2023-01-14
  • 2021-12-27
  • 2022-12-23
  • 2022-02-04
相关资源
相似解决方案