Advertisement
Home Open Editor ❯

HTML onoffline event Attribute

Example

<body ononline="onFunction()" onoffline="offFunction()">

Try this code ❯

Meaning

The onoffline attribute fires when the user agent goes offline.

Found only on the <body> element.


Standard Syntax

<element onoffline="script">


Advertisement

Attribute Values

Value Description
script Specifies the script to be run on onoffline.

Technical Details

Supported HTML elements:

<body>
Home Open Editor ❯
Advertisement