Вопрос по javascript, jquery – Проблема Chrome "beforeunload"

15

Error: User Rate Limit Exceeded

$(window).bind('beforeunload', function(){
    alert("Good Bye")
});

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

function LogTime()
{
    jQuery.ajax({
      type: "POST",
      url: "log.php",
      data: "",
      cache: false,
      success: function(response)
      {
      }
    );
}

$(window).bind('beforeunload', function(){
    LogTime();
});

Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededonbeforeunloadError: User Rate Limit Exceeded Joseph
Error: User Rate Limit ExceedednotError: User Rate Limit Exceededalert(), confirm()Error: User Rate Limit Exceededprompt()Error: User Rate Limit Exceededdevelopers.google.com/web/updates/2017/03/dialogs-policyError: User Rate Limit Exceededdeveloper.mozilla.org/en-US/docs/Web/API/Notifications_API Jonathan Marzullo

Ваш Ответ

6   ответов
6

Error: User Rate Limit Exceeded

$(window).on('beforeunload', function(){
  return "Good Bye";
});
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
3

window.addEventListener("beforeunload", function (e) {

  var confirmationMessage = "\o/";     
  e.returnValue = confirmationMessage;           
  return confirmationMessage;       

});
2

function LogTime(){

jQuery.ajax({
  type: "POST",
  url: "log.php",
  data: "",
  cache: false,
  success: function(response){

  }
});

}

 $(window).bind('beforeunload', function(){
     LogTime();
     return "You're leaving?";
 });

4

<script>
  jQuery(document).ready( 
    function () { 
      jQuery(window).bind('beforeunload',  
        function (e) {  

          [code here]

        } 
      );

    } 
  );
</script>
0

14

$(window).on('beforeunload', function(){
    return "Good bye";
});​
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded skos
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded skos

Похожие вопросы