Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/428.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用ESC按钮的网站紧急按钮_Javascript_Html_Wordpress - Fatal编程技术网

Javascript 使用ESC按钮的网站紧急按钮

Javascript 使用ESC按钮的网站紧急按钮,javascript,html,wordpress,Javascript,Html,Wordpress,我正在开发网站上使用wordpress: 我想添加一个紧急按钮,如我在这里找到的: 当我下载他们的软件并使用测试页面时,我可以使用ESC按钮,但在WP中它不起作用。按钮工作正常 我基本上只是添加了他们的代码(并更改了CSS),但WP有点不正确: <!-- begin panic button --> <div id="panic-container" class="panic-button">

我正在开发网站上使用wordpress: 我想添加一个紧急按钮,如我在这里找到的:

当我下载他们的软件并使用测试页面时,我可以使用ESC按钮,但在WP中它不起作用。按钮工作正常

我基本上只是添加了他们的代码(并更改了CSS),但WP有点不正确:

             <!-- 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">&times;</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控制台错误吗?很高兴听到!