Open In App

HTML DOM Marquee scrollDelay Property

Last Updated : 15 Jul, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The Marquee scrollDelay Property in HTML DOM is used to set or return the value of the scrolldelay attribute of the <marquee> element. The scrolldelay attribute is used to specify the millisecond gap between each scroll movement. It has a default value which is 85. 

Syntax:

It returns a Marquee scrollDelay property.

marqueeObject.scrollDelay; 

It is used to set a Marquee scrollDelay Property.

marqueeObject.scrollDelay = "numbers"; 

Note: This property is depreciated from HTML 5.

Property Values: It contains a numeric value that determines the speed of the marquee. 

Note: If the value less than 60 is not acceptable unless true speed is specified. 

Example: Below program returns the DOM Marquee scrollDelay Property. 

HTML




<!DOCTYPE html>
<html>
 
<body style="text-align:center;">
    <h1 style="color:green;">
        GeeksforGeeks
    </h1>
 
    <h2>DOM Marquee scrollDelay Property</h2>
 
    <marquee id="marqueeID" direction="right"
             scrollamount="5"
            bgcolor="green" height="40px"
            scrolldelay="60";
             >
        GeeksforGeeks:A computer Science
        Portal for Geeks
    </marquee>
    <br><br>
 
    <button onclick="btnClick()">
        Return 
    </button>
    <p id="sudo"
       style="font-size:30px; font-weight:bold;">
    </p>
 
 
    <script>
        function btnClick() {
            var txt = document.getElementById(
                "marqueeID").scrollDelay;
 
            document.getElementById(
                "sudo").innerHTML = txt;
        }
    </script>
</body>
</html>


Output:

HTML DOM Marquee scrollDelay Property

HTML DOM Marquee  scrollDelay Property

Supported Browsers:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Apple Safari
  • Opera


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads