<html>
<head>
<title>Abakada DHTML Demo: Using the attributes Collection</title>
<link rel="stylesheet" href="/shared/netdemos.css">
<script language="JavaScript">
<!--
function getAttribs ( ) {
var attribs = document.body.attributes;
var atts = "The BODY element has the following attributes:\n";
for ( a = 0; a < attribs.length; a ++ )
atts += "\n" + attribs [ a ].nodeName;
output.innerText = atts;
}
//-->
</script>
</head>
<body bgcolor="lavender">
<div class="header"><h2>Abakada DHTML Demo: Using the <b>attributes</b> Collection</h2></div>
<hr size=1 width=92%>
<center>
<p>This example shows how the <b>attributes</b> collection is used <br>
to iterate through all the supported attributes of a specified object, <br>
in this case the document <b>BODY</b>. </p>
<p><input type="button" value="Get Attributes" onclick="getAttribs ( )"></p>
<h4 id="output"></h4>
</center>
<hr size=1 width=92%>
<!-- #include virtual="~/shared/viewsrc.inc" -->
</body>
</html>