mozilla
Your Search Results

    GlobalEventHandlers.onresize

    The GlobalEventHandlers.onreset property contains an EventHandler triggered when a resize event is received.

    Syntax

    window.onresize = funcRef;
    

    Parameters

    • funcRef is a reference to a function.

    Example

    window.onresize = doFunc;
    
    <html>
    <head>
    
    <title>onresize test</title>
    
    <script type="text/javascript">
    
    window.onresize = resize;
    
    function resize()
    {
     alert("resize event detected!");
    }
    </script>
    </head>
    
    <body>
    <p>Resize the browser window to fire the resize event.</p>
    </body>
    </html>
    

    Notes

    The resize event is fired after the window has been resized.

    Specification

    Not part of specification.

    Document Tags and Contributors

    Tags: 
    Contributors to this page: Sheppy, fscholz, ziyunfei, LibreGeekingKid, Rappo, Jabez, teoli, kosvrouvas, Rikdc
    Last updated by: teoli,