You are here: Reference > JavaScript > client-side > browser > properties > updateInterval (screen)

updateInterval property (screen)

Browser support:
Specifies or returns the time interval (in milliseconds) between screen updates.
A value of 0 means that the update interval depends on the system, not the value of the updateInterval property.


You can find the related objects in the Supported by objects section below.
This property is read/write.

Possible values:

Integer that sets or retrieves the time interval, in milliseconds. Default is 0.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the updateInterval property:
    <script type="text/javascript">
        function Init () {
            setInterval (Animate, 50);

        function Animate () {
            var flying = document.getElementById ("flying");
            var leftPos = parseInt (;
            leftPos += 10;
            if (leftPos > 400)
                leftPos = 0;
   = leftPos + "px";

        function ModifyUpdateInterval (selectTag) {
            screen.updateInterval = selectTag.value;
<body onload="Init ();">
    <div id="flying" style="position:absolute; left:0px; top:200px; background-color:#e0a0a0;">Flying</div>

    You can modify the update interval of the screen with the following selection list:
    <select onchange="ModifyUpdateInterval (this)">
        <option value="0">0</option>
        <option value="200">200</option>
        <option value="500">500</option>
        <option value="1000">1000</option>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content