function scrollre()
{
for(var i=0,i<500,i++)
{ parent.scroll(1,i)}
}
只知道是实现滚屏,i从小到大就是数值方向上从上到下滚屏,;
可是,参数x更改为什么没反应,还有500这个数值可以更改到多大或者多小
2 个解决方案
#1
scroll Method Internet Development Index
--------------------------------------------------------------------------------
Causes the window to scroll to the specified x- and y-offset at the upper-left corner of the window.
Syntax
window.scroll(iX, iY)
Parameters
iX Required. Integer that specifies the horizontal scroll offset, in pixels.
iY Required. Integer that specifies the vertical scroll offset, in pixels.
Return Value
No return value.
Remarks
This method is provided for backward compatibility only. The recommended way to scroll a window is to use the scrollTo method.
Standards Information
There is no public standard that applies to this method.
--------------------------------------------------------------------------------
Causes the window to scroll to the specified x- and y-offset at the upper-left corner of the window.
Syntax
window.scroll(iX, iY)
Parameters
iX Required. Integer that specifies the horizontal scroll offset, in pixels.
iY Required. Integer that specifies the vertical scroll offset, in pixels.
Return Value
No return value.
Remarks
This method is provided for backward compatibility only. The recommended way to scroll a window is to use the scrollTo method.
Standards Information
There is no public standard that applies to this method.
#2
x是横向滚动,y是纵向滚动
#1
scroll Method Internet Development Index
--------------------------------------------------------------------------------
Causes the window to scroll to the specified x- and y-offset at the upper-left corner of the window.
Syntax
window.scroll(iX, iY)
Parameters
iX Required. Integer that specifies the horizontal scroll offset, in pixels.
iY Required. Integer that specifies the vertical scroll offset, in pixels.
Return Value
No return value.
Remarks
This method is provided for backward compatibility only. The recommended way to scroll a window is to use the scrollTo method.
Standards Information
There is no public standard that applies to this method.
--------------------------------------------------------------------------------
Causes the window to scroll to the specified x- and y-offset at the upper-left corner of the window.
Syntax
window.scroll(iX, iY)
Parameters
iX Required. Integer that specifies the horizontal scroll offset, in pixels.
iY Required. Integer that specifies the vertical scroll offset, in pixels.
Return Value
No return value.
Remarks
This method is provided for backward compatibility only. The recommended way to scroll a window is to use the scrollTo method.
Standards Information
There is no public standard that applies to this method.
#2
x是横向滚动,y是纵向滚动