在Java脚本功能后面设置按钮链接

时间:2018-07-12 13:56:41

标签: javascript html onclick onclicklistener

我想在Java脚本函数后面建立号召性用语链接。但是不知何故,我找不到问题。

<html>
<body>

<a href="javascript:void(0)" rel="noreferrer" onclick="exit_offer();PreventExitPop = false" class="claim">click here</a>

<script type="text/javascript">
     function exit_offer() {
            window.onbeforeunload=null;
          window.location = “http://example.com”;
       }
</script>


</body>
</html>

0 个答案:

没有答案
相关问题