Compare Revisions

Element.scrollLeft

Revision 69970:

Revision 69970 by George3 on

Revision 69971:

Revision 69971 by Tetrix on

Title:
element.scrollLeft
element.scrollLeft
Slug:
DOM/element.scrollLeft
DOM/element.scrollLeft
Tags:
DOM, Gecko, "Gecko DOM Reference"
DOM, Gecko, "Gecko DOM Reference"
Content:

Revision 69970
Revision 69971
t45<script type="text/javascript">t45 
46 
47function doScrollLeft()
48{
49  document.getElementById('aDiv').scrollLeft = 50;
50}
51 
52</script>
53 
54<div id="aDiv"
55     style="width: 200px; height: 200px; overflow: scroll;"
56>
57<script type="text/javascript">
58for (var i=0; i<100; ++i){
59  document.write(i + '<pre>-FooBar-FooBar-FooBar-FooBar-Foo
>Bar-FooBar<br>'); 
60}
61</script>
62</div>
63<br>
64<input type="button" value="Scroll left 50"
65       onclick="doScrollLeft();">
66 

Back to History