简体   繁体   English

net :: ERR_FILE_NOT_FOUND:在PhpStorm服务器上工作,但在浏览器中工作

[英]net::ERR_FILE_NOT_FOUND: Working on PhpStorm server but not working in the browser

I am testing an html webpage and in the browser it's not working .It is failing to load: 我正在测试html网页,并且在浏览器中无法正常工作。无法加载:

src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"

this is the error: 这是错误:

GET file://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js net::ERR_FILE_NOT_FOUND GET file://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js net :: ERR_FILE_NOT_FOUND

and I'd like to question another error in the same html webpage that is the following: 并且我想在以下相同的html网页中质疑另一个错误:

Uncaught ReferenceError: $ is not defined at files.html:337 未捕获的ReferenceError:$在files.html:337中未定义

this is the script: 这是脚本:

$('.toggle').click(function (e) {
e.preventDefault();
var $this = $(this);
if ($this.next().hasClass('show')) {
    $this.next().removeClass('show');
    $this.next().slideUp(350);
} else {
    $this.parent().parent().find('li .inner').removeClass('show');
    $this.parent().parent().find('li .inner').slideUp(350);
    $this.next().toggleClass('show');
    $this.next().slideToggle(350);
}
});

Instead of 代替
src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"
Use 采用
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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