<html>
<head>
<script>
function runTests() { 
                
var docType = document.implementation.createDocumentType("example", 
	      "http://www.example.com/", "myDoc.dtd");
       
if (docType)
  s = "document type created";
else
  s = "document type not created";
  
text = document.createTextNode(s);
document.getElementById('output').appendChild(text);
}
</script>
</head>
<body onload="runTests()">
<p>
The text below should say "document type created";
</p>
<div id="output">
</div>
</body>
</html>