Javascript 使用ESC按钮的网站紧急按钮
我正在开发网站上使用wordpress: 我想添加一个紧急按钮,如我在这里找到的: 当我下载他们的软件并使用测试页面时,我可以使用ESC按钮,但在WP中它不起作用。按钮工作正常 我基本上只是添加了他们的代码(并更改了CSS),但WP有点不正确:Javascript 使用ESC按钮的网站紧急按钮,javascript,html,wordpress,Javascript,Html,Wordpress,我正在开发网站上使用wordpress: 我想添加一个紧急按钮,如我在这里找到的: 当我下载他们的软件并使用测试页面时,我可以使用ESC按钮,但在WP中它不起作用。按钮工作正常 我基本上只是添加了他们的代码(并更改了CSS),但WP有点不正确: <!-- begin panic button --> <div id="panic-container" class="panic-button">
<!-- begin panic button -->
<div id="panic-container" class="panic-button">
<span class="panic-button__text">Protect yourself online.</span>
<a class="panic-button__link"
href="https://www.domesticshelters.org/safe-surfing"
>
Learn how to hide your browsing history.
</a>
<a id="panic-button" class="panic-button__button"
href="https://www.weather.com"
>
<span class="panic-button__icon">×</span>
Quick exit (ESC)
</a>
</div>
<link rel="stylesheet" property="stylesheet" href="https://cdn.rawgit.com/studiothick/panic-button/v1.0.4/dist/panic.css" />
<script async src="https://cdn.rawgit.com/studiothick/panic-button/v1.0.4/dist/panic.min.js"></script>
<!-- end panic button -->
在线保护自己。
您能尝试使用最新版本的panic.js插件吗,如图所示:有javascript控制台错误吗?很高兴听到!