小编Mia*_*Mia的帖子

Chrome扩展程序"拒绝加载脚本,因为它违反了以下内容安全策略指令"

我正在尝试创建Chrome扩展程序,但我的JS都没有.控制台显示此错误:

拒绝加载脚本' https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js ',因为它违反了以下内容安全策略指令:"script-src'self'blob :filesystem:chrome-extension-resource:".

为什么阻止我的jQuery运行?

html javascript jquery google-chrome google-chrome-extension

23
推荐指数
4
解决办法
3万
查看次数

仅使用CSS关闭模态

我只需要使用以下CSS来关闭模态:http : //jsfiddle.net/raving/1mhsynmw/

但是,我无法使其正常工作。我的模态如下。

function alert(msg) {
	document.getElementById("alert").innerHTML = '<div class="modal-overlay"><div class="modal"><div class="modal-container"><h3>' + msg + '</h3><p>' + msg + '</p></div><p class="modal-footer"><a href="javascript:" id="ok">OK</a></p></div>';
}

alert("This is some text to show you this modal. This is some text to show you this modal. This is some text to show you this modal. This is some text to show you this modal.");
Run Code Online (Sandbox Code Playgroud)
body {
  font-family:arial;
  font-size:11px;
}
.modal {
     position: fixed;
     top: 20px;
     margin-left: auto;
     margin-right: auto;
     left: 0;
     right: …
Run Code Online (Sandbox Code Playgroud)

html javascript css modal-dialog

5
推荐指数
1
解决办法
2851
查看次数

强制关闭弹出窗口并重新打开它 Chrome 扩展

有没有办法强制关闭 chrome 扩展并在关闭后自动重新打开它?

html google-chrome-extension

2
推荐指数
1
解决办法
1782
查看次数

解析错误:语法错误,意外'(',期望变量(T_VARIABLE)或'$'

我收到错误,我不知道如何解决它..

错误是:

解析错误:第7行的C:\ xampp\htdocs\records\delete-confirm.php中的语法错误,意外的'(',期望变量(T_VARIABLE)或'$'

第7行是:

echo "<script>$(document).ready(function(){$('.modal-" . $row->id . "').hide();$('#delete-" . $row->id . "').click(function(){$('.modal-" . $row->id . "').show();});$('#cancel-" . $row->id . "').click(function(){$('.modal-" . $row->id . "').hide();});});</script>";
Run Code Online (Sandbox Code Playgroud)

我检查了整条线,但那里似乎没有错误?这里出了什么问题?

html javascript php jquery

1
推荐指数
1
解决办法
3866
查看次数