我有以下捆绑包。
bundles.Add(new ScriptBundle("~/bundles/scripts").Include(
"~/Scripts/jquery-2.1.3.min.js",
"~/Scripts/bootstrap.js",
"~/Scripts/respond.js"));
bundles.Add(new ScriptBundle("~/bundles/description").Include(
"~/Scripts/dropzone/dropzone.min.js",
"~/Scripts/jquery-validate.js",
"~/Scripts/form-validation.js",
"~/Scripts/fancybox.min.js",
"~/Scripts/elements.js",
"~/Scripts/descriptionPage.js"
));
在我的LayoutPage上我有以下内容呈现相关的脚本
@Scripts.Render("~/bundles/scripts")
@RenderSection("scripts", required: false)
现在位于我位于某个区域的View中,然后将描述包注册为
@section scripts{
@Scripts.Render("~/bundles/description")
}
现在当我查看源代码时,我看到以下内容
<script src="/Scripts/jquery-2.1.3.min.js"></script>
<script src="/Scripts/bootstrap.js"></script>
<script src="/Scripts/jquery-validate.js"></script>
<script src="/Scripts/dropzone/dropzone.min.js"></script>
<script src="/Scripts/form-validation.js"></script>
<script src="/Scripts/fancybox.min.js"></script>
<script src="/Scripts/elements.js"></script>
<script src="/Scripts/descriptionPage.js"></script>
所有内容都按预期存在,问题是jquery-2.1.3.min.js在查看源时显示为红色,并且在使用firebug时出现错误,并且在查看源代码时鼠标悬停在脚本标记上时是杂散开始标记'脚本'
所以我决定开始评论js文件以找到该文件,结果发现它的dropzone.min.js评论出错误消失了,有人可以告诉我还是帮我解决这个问题?