简体   繁体   中英

jquery.min.js Failed to load resource

Why this link doesn`t work?

//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta name="Description" content=" [wstaw tu opis strony] ">
    <meta name="Keywords" content=" [wstaw tu slowa kluczowe] ">
    <meta name="Author" content=" [dane autora] ">
    <title>[tytuł strony] </title>
    <link rel="stylesheet" href="style.css" type="text/css">
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $(".animat_kon").click(function () {
                $(".animat_text").slideToggle("slow");
            });
        });
    </script>
</head>

error example:在此处输入图片说明

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

you did not included http://

whenever you are downloading from the server directly then use http://

Change

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

into

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

You missed the http: . You can skip the http: to let your browser automatically choose between HTTPS and HTTP. But in your case the debugging tool seems not to understand this syntax.

Find more information here: Can I change all my http:// links to just //?

链接必须以http://开头

Please change your script src to:

    <link rel="stylesheet" href="style.css" type="text/css"> 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">

script src should start with http://

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM