DOM的hello, world


<html>
<head>
<title>hello, world</title>
<script language="JavaScript">
<!--
function main() {
var d = window.document;
var text = d.createTextNode("hello, world");
var elem = d.createElement("br");
d.body.appendChild(text);
d.body.appendChild(elem);
}
//-->
</script>
</head>
<body onLoad="main();">
</body>
</html>