Raf*_*per 6 javascript debugging
为什么这个链接不起作用?
//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>
Run Code Online (Sandbox Code Playgroud)
错误示例:
PSR*_*PSR 13
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
你没有包括http://
无论何时从服务器直接下载,然后使用http://
更改
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
成
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
你错过了http:
.您可以跳过http:
让浏览器自动在HTTPS和HTTP之间进行选择.但在您的情况下,调试工具似乎不理解这种语法.
在此处查找更多信息:我可以将所有http://链接更改为//吗?