最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

.unload()

.unload( handler(eventObject) ) Returns: jQuery

Description: Bind an event handler to the "unload" JavaScript event.

  • version added: 1.0.unload( handler(eventObject) )

    handler(eventObject)A function to execute when the event is triggered.

  • version added: 1.4.3.unload( [ eventData ], handler(eventObject) )

    eventDataA map of data that will be passed to the event handler.

    handler(eventObject)A function to execute each time the event is triggered.

This method is a shortcut for .bind('unload', handler).

The unload event is sent to the window element when the user navigates away from the page. This could mean one of many things. The user could have clicked on a link to leave the page, or typed in a new URL in the address bar. The forward and back buttons will trigger the event. Closing the browser window will cause the event to be triggered. Even a page reload will first create an unload event.

The exact handling of the unload event has varied from version to version of browsers. For example, some versions of Firefox trigger the event when a link is followed, but not when the window is closed. In practical usage, behavior should be tested on all supported browsers, and contrasted with the proprietary beforeunload event.

Any unload event handler should be bound to the window object:

$(window).unload(function() {
  alert('Handler for .unload() called.');
});

After this code executes, the alert will be displayed whenever the browser leaves the current page. It is not possible to cancel the unload event with .preventDefault(). This event is available so that scripts can perform cleanup when the user leaves the page.

Example:

To display an alert when a page is unloaded:

$(window).unload( function () { alert("Bye now!"); } );
jQuery 1.6 API 中文版腳本之家整理、修訂 (2011年6月)
孙吴县| 宣恩县| 济阳县| 泽库县| 宜阳县| 萝北县| 林周县| 静乐县| 木里| 姜堰市| 连州市| 松江区| 富源县| 秦安县| 乐安县| 南平市| 新安县| 新河县| 德惠市| 昌图县| 苏尼特右旗| 千阳县| 宣武区| 临西县| 聂荣县| 鹤壁市| 兰考县| 宁海县| 晋中市| 永德县| 遵义县| 北流市| 南京市| 张家界市| 芜湖市| 农安县| 山西省| 澄城县| 玉林市| 敖汉旗| 佛山市|