Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发一个 chrome 扩展程序,我想知道,有没有办法将整个本地存储从后台页面传递给contentscript
内容脚本和扩展页面之间的消息传递
这样我就可以使用内容脚本中本地存储的所有键/值?
从后台页面发送:
sendResponse({all_lS: JSON.stringify(localStorage));
在内容脚本中:
var lS = JSON.parse(response.all_lS);
它将是您的 localStorage 的副本。
我有一个带有集成 CKeditor 的 cms。Ckeditor 替换<?php with <!--?php. 我想在 ckeditor 中编写 php 代码"<div><?php $prod=products($cat_id); ?>....</div>"并将其存储到 MySQL DB.. 并且在查看器的页面上我想输出
<?php with <!--?php
"<div><?php $prod=products($cat_id); ?>....</div>"