![]() |
Definition and UsageThe ononline attribute fires when the browser starts to work online. Tip: The ononline attribute is the opposite of the onoffline attribute. Applies toThe ononline attribute is part of the Event Attributes, and can be used on the following element:
Browser SupportThe numbers in the table specify the first browser version that fully supports the event attribute.
|
Example:
HTML
<!DOCTYPE html>
<html>
<body ononline="onFunction()" onoffline="offFunction()">
<p>Try to disconnect from the internet to toggle between working online and offline.</p>
<script>
function onFunction() { alert ("Your browser is working online.");
}
function offFunction() { alert ("Your browser is working offline.");
}
</script>
</body>
</html>
html ononline attribute |
How to Execute a JavaScript when the browser starts to work online - HTML ononline Attribute | HTML Attribute |
Type
: |
Develop |
Category
: |
Web Tutorial |
Sub Category
: |
HTML Attribute |
Uploaded by
: |
Admin |
Read Article https://horje.com/learn/1434/reference