JQuery在我的页面上不起作用,我以不同的方式包含了库(我的意思是一直使用不同的链接作为src,并且所有这些都是正确的)并且我仍然得到“$未定义”
我还应该尝试什么?
以下是页面上的内容:
<html>
<head>
<!-- stuff up here css include title, etc -->
<script scr="../res/jquery.js"></script>
</head>
<body>
//not important code here
</body>
<script>
function go_login(){
var username = $('#username').val(); // the error starts at this line!
...
</script>
</html>
正如我所说,我试图从其他来源(本地和外部)包含库,但仍然发生了同样的错误。 (请注意,我已经测试了所有来源和参考链接,它们都是正确的!)。
答案 0 :(得分:0)
我是一个白痴,语法错误。