簡體   English   中英

IE 10 not event不能使用JQuery觸發bind()或on()

[英]IE 10 not event not firing bind() or on() using JQuery

$('body').unload(function () {

});
$('body').on("beforeunload", function () {

  //if true Means Logged is Clicked else Page close clicked
  if (IsTrue == 0) {
    BTGUI.WebServices.ConnectionToken.GetLogOutClientUserMethod(LogOutClientUserMethodSucess);
  }
  else {
    BTGUI.WebServices.ConnectionToken.PageClosedXmlMethod(hddClient, hddUserName);
  }

IE 10中不會觸發Bind()on()事件,除非IE在所有瀏覽器上都能正常工作。 任何可以使用的IE版本我正在使用jquery 1.7.0我也測試了$(window)不起作用。

是的,事件處理程序應綁定到$(window)。 Beforeunload處理程序應該只返回要在確認框中顯示的字符串。 在我看來,您要做的不止這些。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM