Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | ononline Event Attribute

  • Difficulty Level : Easy
  • Last Updated : 30 Jul, 2021

The ononline event attribute works when the browser starts working in online mode. it is opposite to onoffline event attribute.
Supported Tags 

  • <body>


<element ononline = "script">

Attribute Value: This event attribute contains single value script which works when browser working in online mode.


            ononline Event Attribute
            function onfunction() {
                alert("Browser is online");
            function offunction() {
                alert("browser is offline");
    <!-- ononline event used here -->
    <body ononline = "onfunction()"
        onoffline = "offunction()">


Supported Browser: This event is supported by Firefox 3.0 only. No other browser support this event.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!