0

問題#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をロードしています。これは、nugetパッケージを介してインストールされたVS2012プロジェクトに含まれています。ファイルは間違いなくscriptsフォルダーにあります

私のスクリプトは実行されておらず、jsfiddleで動作するため、その理由を想定しています。

4

1 に答える 1

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.

幸運を。

于 2016-02-15T06:00:46.570 に答える