HTML | ononline Event Attribute
The ononline event attribute works when the browser starts working in online mode. it is opposite to onoffline event attribute.
syntax
<element ononline = "script">
Attribute Value: This event attribute contains single value script which works when browser working in online mode.
Example:
<!DOCTYPE HTML> <html> <head> <title> ononline Event Attribute </title> <script> function onfunction() { alert("Browser is online"); } function offunction() { alert("browser is offline"); } </script> </head> <!-- ononline event used here --> <body ononline = "onfunction()" onoffline = "offunction()"> </body> </html> |
chevron_right
filter_none
Output:

Supported Browser: This event is supported by Firefox 3.0 only. No other browser support this event.
Recommended Posts:
- HTML | DOM ononline Event
- HTML | onmouseout Event Attribute
- HTML | onwheel Event Attribute
- HTML | oncontextmenu Event Attribute
- HTML | onclick Event Attribute
- HTML | onpaste Event Attribute
- HTML | onmouseup Event Attribute
- HTML | oninput Event Attribute
- HTML | onchange Event Attribute
- HTML | ondblclick Event Attribute
- HTML | onmousemove Event Attribute
- HTML | onload Event Attribute
- HTML | ondragover Event Attribute
- HTML | oninvalid Event Attribute
- HTML | ondragleave Event Attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



