日期:2014-05-16  浏览次数:20434 次

JS无法加载到浏览器中。
<html>
<head>
<title> 无标题文档 </title>
<script   language= "javascript ">
document.write( "欢迎来到javaScript世界 ");
</script>
</head>
<body>
<p> 尽情享受学习的快乐!!! </p>
</body>
</html>


这段代码在浏览器运行时无法运行 <script> </script> 标记中的内容。


------解决方案--------------------
放到 <body> </body> 之间
<html>
<head>
<title> 无标题文档 </title>

</head>
<body>
<script language= "javascript ">
document.write( "欢迎来到javaScript世界 ");
</script>
<p> 尽情享受学习的快乐!!! </p>
</body>
</html>
------解决方案--------------------
<html>
<head>
<title> 无标题文档 </title>
<script language= "javascript ">
document.write( "欢迎来到javaScript世界 ");
</script>
</head>
<body>
<p> 尽情享受学习的快乐!!! </p>
</body>
</html>
------------------------------
相当于

<html>
<head>
<title> 无标题文档 </title>
欢迎来到javaScript世界
</head>
<body>
<p> 尽情享受学习的快乐!!! </p>
</body>
</html>


在head标签里的文字不显示很正常啊~~~