我将此代码用于出口流量
<script type=”text/javascript” language=”javascript”>
function areYouSure() {
areYouReallySure = true;
location.href=”http://example.com”
return “WAIT! Maybe you’d like to try ShamWow instead?rnOrder now and we’ll have Chuck Norris personally deliver it!”;
}
window.onbeforeunload = areYouSure;
</script>
代码只是从不被调用。
这是一个演示 http://provendate.com/testpop.php
为什么?
如果您想在
有人离开页面时显示确认,您所要做的就是:
window.onbeforeunload = function() {
return "I'm a really annoying message, please stay !";
}
这是一个小提琴