scrollAmount property (marquee)
Sets or retrieves the width in pixels between successive displays of the scrolling text in a marquee.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
HTML page for this property: scrollAmount |
Possible values:
Integer that sets or retrieves the amount of pixels by which themarquee jumps. The default is 6 (pixels). If the value is a negative number, the default (6) will be set.
Default: 6.
Example HTML code 1:
This example illustrates the use of the scrollAmount attribute:
|
||||
<marquee style="width:200px;" scrollamount="10">scrollamount = 10</marquee> <br /> <marquee style="width:200px;" scrollamount="20">scrollamount = 20</marquee> |
||||
|
||||
Did you find this example helpful?
|
Example HTML code 2:
This example illustrates the use of the scrollAmount property:
|
||||
<head> <script type="text/javascript"> function ChangeScrollAmount () { var marquee = document.getElementById ("myMarquee"); var input = document.getElementById ("myInput"); marquee.scrollAmount = input.value; } </script> </head> <body> <marquee id="myMarquee" style="width:150px;" scrollamount="10">Hi There!</marquee> <br /> <input id="myInput" type="text" value="20" /> <button onclick="ChangeScrollAmount ();">Change scrollAmount!</button> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
HTML elements:
Related pages:
External links:
User Contributed Comments