Horje
HTML DOM Marquee scrollDelay Property

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



Reffered: https://www.geeksforgeeks.org


HTML

Related
HTML DOM Input Search focus() Method HTML DOM Input Search focus() Method
HTML DOM Input Text focus() Method HTML DOM Input Text focus() Method
What are Cell Padding &amp; Cell Spacing in HTML Table ? What are Cell Padding &amp; Cell Spacing in HTML Table ?
What is the significance of adding autocomplete attribute in HTML Form ? What is the significance of adding autocomplete attribute in HTML Form ?
HTML DOM Textarea type Property HTML DOM Textarea type Property

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
12