Google Chromeでは、次のコードスニペット:
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<title>Example</title>
<script type = "text/javascript">
<!--
function onBodyLoad()
{
var x = 42;
document.writeln("x = " + x);
alert("on load");
}
-->
</script>
</head>
<body onload = "onBodyLoad()"></body>
</html>
書いていません
x = 42
ドキュメントに。ただし、アラートは表示されます。テキストとアラートは両方ともIE8とFF3.5で表示されます。何かご意見は?