我在将自动填充与我项目中需要的其他JavaScript库结合使用时遇到了问题。
当我运行这个简单的例子时,它第一次工作正常。它完美地显示了自动完成窗口,但如果我尝试更改我正在键入的单词,则会在Chrome中生成此错误:
未捕获的ReferenceError:文件jquery-1.4.4-vsdoc.js上未定义pos:2495
这是代码:
$(function () {
var availableTags = [
"ActionScript",
"AppleScript",
"Asp",
"BASIC",
"C",
"C++",
"Clojure",
"COBOL",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Haskell",
"Java",
"JavaScript",
"Lisp",
"Perl",
"PHP",
"Python",
"Ruby",
"Scala",
"Scheme"
];
$("#txtPesquisar").autocomplete({
source: availableTags
});
});
我在我的主页面中为我的项目引导所有这些javascripts。
我不知道为什么会收到此错误。
<link href="<%= Url.Content("~/Content/jquery-ui-1.10.1.custom.css") %>" rel="stylesheet" type="text/css" />
<script src="<%= Url.Content("~/Scripts/jquery-1.9.1.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/Scripts/jquery-1.4.4-vsdoc.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/Scripts/Utils.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/Scripts/jquery.form.js") %>" type="text/javascript"></script>
<script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script src="<%= Url.Content("~/Scripts/jquery-ui.js")%>" type="text/javascript"> </script>
<script src="<%= Url.Content("~/Scripts/JuridicOffice.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript" ></script>
<%--<script src="<%= Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript" ></script>
<script src="<%= Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js") %>" type="text/javascript" ></script>--%>
<script src="<%= Url.Content("~/Uploadify/swfobject.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/Uploadify/jquery.uploadify.v2.1.4.min.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/Scripts/jgcharts.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/Scripts/Mascara.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/Scripts/jquery.maskedinput-1.3.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/Scripts/jquery.color.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/Scripts/jquery.Jcrop.min.js") %>" type="text/javascript"></script>
我在论坛里点了一些东西,它可能是一个回发函数,但我不知道如何解决它。
感谢您的帮助
答案 0 :(得分:2)
如果打开你可以用这个音符找到的vsdoc。
/*
* This file has been commented to support Visual Studio Intellisense.
* You should not use this file at runtime inside the browser--it is only
* intended to be used only for design-time IntelliSense. Please use the
* standard jQuery library for all production use.
*
* Comment version: 1.4.4a
*/