javascript onunload attribute


  Translation results:

on

英[ɒn]   美[ɑ:n]  

prep. (indicating direction) to; (indicating object) to; (indicating position) on...; (indicating time) at the time of...

adv. (put, wear, connect) on; forward, (continue) go on

adj. active situation, state ; in use; happening; planned

unload

英[ˌʌnˈləʊd] US[ˌʌnˈloʊd]

vt.Unload; remove Burden; pour; deal with, dump

vi. Unload goods or other burdens; unload bullets; [Business] sell (securities)

Third person singular: unloads Present participle: unloading Past tense: unloaded past participle: unloaded

javascript onunload attributesyntax

Function: Occurs when the user exits the page.

Syntax: onunload="SomeJavaScriptCode"

Parameters: SomeJavaScriptCode Required. Specifies the JavaScript to be executed when this event occurs.​

javascript onunload attributeexample

<html>
<head>
    <meta charset="UTF-8">

</head>

<body onunload="alert('The onunload event was triggered')">
</body>

</html>

Home

Videos

Q&A