為什么document.write()中的內(nèi)容顯示不出來(lái)?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>系好安全帶,準(zhǔn)備啟航</title>
<!--引入外部文件的方式-->
<script src="scrite.js"></script>
//script.js中寫(xiě)的document.write("喜好安全帶,準(zhǔn)備起航吧!");
<script type="text/javascript">
//多行注釋
? /*我是多行注釋?zhuān)?/p>
? 我需要隱藏,
? 否則會(huì)報(bào)錯(cuò)哦!*/
//在頁(yè)面中顯示文字
//頁(yè)面中彈出提示框
alert("準(zhǔn)備好了,起航吧!");
//單行注釋
? ?//我是單行注釋?zhuān)乙惨[藏起來(lái)!
</script>
</head>
<body>
</body>
</html>
2019-10-15
<script src="scrite.js"></script>? ?js文件名寫(xiě)錯(cuò)了
2019-10-15
應(yīng)該括號(hào)后面用單引號(hào)