Home >Web Front-end >JS Tutorial >Code to control iframe scrolling with javascript_javascript skills
Now there is a horizontal IFRAME. I need to click an image outside the iframe to horizontally scroll an html page inside the iframe, but I don’t want to see the scroll bar of the iframe. How to solve it????
demo.htm 🎜>
onmousedown="timer1=setInterval('parent.frames['in'].scrollBy(0 ,-1)',10)"
onmouseup="clearInterval(timer1)">
onmousedown="timer1=setInterval('parent.frames ['in'].scrollBy(0,1)',10)"
onmouseup="clearInterval(timer1)" >
in.htm
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Scroll horizontally..
demox.htm