我无法将外部JavaScript文件连接到我的html页面。
当我将脚本放在带有
你的HTML代码出现了很多问题,可以先搜索HTML(5)基础知识学习一下,首先应该学习基本结构,例如以下内容:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf8">
<title>Welcome</title>
<link type="text/css" href="styles/default.css">
</head>
<body>
<!-- HTML Content -->
<script type="text/javascript" src=".."></script>
<script>
// Javascript inside this file
</script>
</body>
</html>
<script>
$(document).ready(function(){
$(".info").hover(function(){
$("#info").fadeIn("slow");
});
$(".close").click(function(){
$("#info").fadeOut("slow");
});
});
</script>
<script></script>
标签代表JS/JQuery等内容。与<?php ?>
相同。 - Casper Round