<!--
alert用来弹出一个对话框,而document.write会把文本写到文档中,然后通过网页来显示。
下面有例子。
-->
<html>
<body>
<script type="text/javascript">
alert("你好")
document.write("Hi")
</script>
</body>
都是输出的意思
document.write 输出不换行
document.writeln输出信息并换行
</html>