问题#1以下代码在我的母版页
中<html lang="en">
<head id="Head1" runat="server">
<meta charset="utf-8" />
<title>Enerteck, industry leading performance catalysts for diesel fuels</title>
<link href="Styles/Site.css" rel="stylesheet" type="text/css" />
<link href="Styles/nav.css" rel="stylesheet" type="text/css" />
<script src="Scripts/jquery-1.8.2.min.js"></script>
<script src="Scripts/modernizr-2.6.2.js"></script>
<link href="Content/jquery.lightbox.css" rel="stylesheet" type="text/css" />
<script src="Scripts/jquery.lightbox.min.js" ></script>
<asp:ContentPlaceHolder id="HeaderContent" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Name="MsAjaxBundle" />
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="jquery.ui.combined" />
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
</Scripts>
</asp:ScriptManager>
控制台中的错误是 “无法加载资源:服务器响应状态为404(未找到)blahblahblah / Scripts / jquery-1.8.1.js”
我无处可以引用jquery版本1.8.1,我显然加载了1.8.2,这就是VS2012项目中的最新内容,通过nuget包安装。该文件最终位于脚本文件夹
中我的脚本没有运行,我假设这是因为它们在jsfiddle
中工作答案 0 :(得分:0)
我试着在这里回答类似的问题 - https://stackoverflow.com/a/35402418/1945517
这是它的要点,一次只做一步。
1. Print the version that the system is loading like so:
console.log( "You are running jQuery version: " + $.fn.jquery);
2. View the source of the html page rendered.
3. Look for all the jquery source added, checking at <script> imports.
4. Then look for your source code where this is getting added.
5. Fix that, build, and repeat step 2 until you get the right version.
祝你好运。