我制作了一个 PHP 表单,里面有 jquery,用于输入掩码和邮政编码搜索。
在我的本地计算机上,它运行良好。但是一旦我通过 FTP 发送到我的服务器,它就不会了。
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery.mask/0.9.0/jquery.mask.min.js"></script>
最佳答案
必须首先加载 JavaScript,通过您列出的站点,我可以看到 http (cloudflare) 应该是 https ...
尝试...
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/0.9.0/jquery.mask.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
这是 http
上的错误:
Mixed Content: The page at 'https://ssl5929.websiteseguro.com/sbpsp2/psicorreio/emailmarketing/2015/teste/ficha_inscricao.php' was loaded over HTTPS, but requested an insecure resource 'http://cdnjs.cloudflare.com/ajax/libs/jquery.mask/0.9.0/jquery.mask.min.js'. This request has been blocked; the content must be served over HTTPS.
关于javascript - Jquery/JavaScript 在本地运行,但不在服务器上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27279826/