<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\n";
for ( a = 0; a < attribs.length; a ++ )
atts += attribs [ a ].nodeName + ", ";
alert ( atts.substring ( 0, atts.length - 2 ) );
}
//-->
</script>
</head>
<body>
<!-- #include virtual="~/shared/top.inc" -->
<div class="header"><h2>Abakada DHTML Demo: Using the <span class="hilite">attributes Collection</span></h2></div>
<hr size=1 width=92%>
<center>
<p id="msg">This example shows how the attributes collection is used to iterate through all the supported attributes of a specified object, in this case the document <b>BODY</b>. </p>
<p><input type="button" value="Get Attributes" onclick="getAttribs ( )"></p>
</center>
<hr size=1 width=92%>
<!-- #include virtual="~/shared/viewsrc.inc" -->
</body>
</html>