[英]how can i link my javascript file with html???? I think i have linked properly but not working?
將 javascript 代碼鏈接到 html 代碼有什么問題??? 我的 html 代碼:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PARUL</title>
<script src="script.js"></script>
<script>
console.log(x)
</script>
</head>
<body></body>
</html>
我的 javascript 代碼:
var x="hello world";
您已經將 HTML 代碼與 JS 文件相關聯。 按着這些次序:
Inspect
”選項。Elements
、 Console
等。Console
選項卡。 然后您將能夠看到 output 您給出的語句console.log("")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.