HTML DOM Marquee scrollamount Property
Last Updated :
15 Jul, 2022
The HTML DOM Marquee scrollamount Property is used to set or return the value of the scrollamount attribute of the <marquee> element. The scroll amount attribute is used to set the amount of scrolling at each interval in pixels. The default speed of the marquee value is 6.
Syntax:
It returns the marquee scrollamount property.
marqueeObject.scrollAmount;
It sets the marquee scrollamount property.
marqueeObject.scrollAmount="number"
Note: This property is depreciated from HTML 5.
Property Values: It contains a numeric value that represents the speed value of the scrolling element.
Example: Below HTML code use to returns the Marquee scrollamount Property.
HTML
<!DOCTYPE html>
< html >
< body style = "text-align:center;" >
< h1 style = "color:green;" >
GeeksforGeeks
</ h1 >
< h2 >DOM Marquee scrollAmount Property</ h2 >
< marquee id = "marqueeID" direction = "right" behavior = "slide"
loop = "30" bgcolor = "green" height = "40px"
Scrollamount = "12" >
GeeksforGeeks:A computer Science
Portal for Geeks
</ marquee >
< br >< br >
< button onclick = "btnClick()" >
Return speed of Marquee Tag
</ button >
< p id = "sudo" ></ p >
< script >
function btnClick() {
var txt = document.getElementById(
"marqueeID").scrollAmount;
document.getElementById(
"sudo").innerHTML = txt;
}
</ script >
</ body >
</ html >
|
Output:
HTML DOM Marquee scrollamount Property
Supported Browsers:
- Google Chrome
- Internet Explorer
- Firefox
- Apple Safari
- Opera
Share your thoughts in the comments
Please Login to comment...