<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>getAttribute 1</title>
<meta http-equiv="Content-Type" content="text/xml; charset=utf-8" />
<style type="text/css" media="screen">
</style>

<script type="text/javascript">
<![CDATA[

window.onload = function () {

	var body = document.getElementsByTagName("body")[0];
	var p = document.createElement("p");
	p.setAttribute("class", "test");
	var text = document.createTextNode("This paragraph has a class attribute with value " + p.getAttribute("class") + ".");
	p.appendChild(text);
	body.appendChild(p);
	
	
};
]]>

</script>

</head>

<body>

<p>The following paragraph should have a text containing the name of its attribute.</p>


</body>
</html>

