jquery无法正常工作!当我使用script标签时,它起作用了,但是当我添加了一个jquery的附加文件时,它就不起了
我尝试更改文件名
// HTML文件位置:C:\ Users \ junes \ OneDrive \ docs \ Visual Studio Code \ html \ index.html
”
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src ="javascript/js1.js"></script>
</head>
<body>
<p id="p1">This is a paragraph.</p>
</body>
</html>
”
// jquery文件位置:C:\ Users \ junes \ OneDrive \ docs \ Visual Studio Code \ javascript \ js1.js “
$(document).ready(function(){
$("#p1").mouseup(function(){
alert("Mouse up over p1!");
});
});
”