我在 firefox os 验证器中有这条消息:
Erreur:您的代码似乎正在执行违反特权应用程序的 CSP(内容安全策略)的操作。您可以在 Mozilla 开发人员网站上找到有关 CSP 允许和不允许的更多信息。https://developer.mozilla.org/en-US/docs/Security/CSP
www/index.html 16 17 <script type="text/javascript" src="js/select2.js"></script> <script>
代码 index.html :
<!DOCTYPE html>
<html>
<head>
<title>Chri App</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="js/jquery.css.min.css" rel="stylesheet"/>
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery.mobile-1.3.1.min.js"></script>
<meta charset='utf-8'>
<meta name="format-detection" content="telephone=no" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="js/select2/select2.css" rel="stylesheet" >
<link href="css/web_app.css" rel="stylesheet" >
<script src="main.js"></script>
<script type="text/javascript" src="js/select2/select2.js"></script>
<script>
$(document).bind('pageinit',function(e ){
$.support.cors = true;
$.mobile.allowCrossDomainPages= true;
$.mobile.selectmenu.prototype.options.nativeMenu = false;
// When the testform is submitted
$("#search-form-location").select2();
$("#search-form-category").select2();
$("#testform").submit(function() {
$.mobile.loading('show');
.......
你有想法吗?