2013-03-11 4 views
5

왜이 링크가 작동하지 않습니까?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> 

오류 예를 //ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js : enter image description here

+0

시작해야합니까? HTTP 또는 HTTPS 포트에 있습니까? 프레임에 있다면 크로스 도메인 스크립트를로드 할 필요가 없습니다. –

+0

@FedericoGiust 다른 원본에서 스크립트를로드 할 수 있습니다. 그래서 우리는 JSONP를 가지고 있습니다. – Antony

답변

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

로 시작해야합니다 당신이 포함되지 않은 HTTP : 서버에서 다운로드 할 때마다 //

직접 다음 http://를 사용

8

변경을

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

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

http:을 놓쳤습니다. http:을 건너 뛰면 브라우저가 HTTPS와 HTTP 중 하나를 자동으로 선택할 수 있습니다. 그러나 귀하의 경우 디버깅 도구는이 구문을 이해하지 못하는 것 같습니다.

여기에 추가 정보 찾기 : Can I change all my http:// links to just //?

0

스크립트 src를 다음으로 변경하십시오.

<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"> 

스크립트 SRC는 HTML 페이지가 프레임에 앉아있다 http://

관련 문제