为什么window.scrollBy()不适用于window.open()?
嗨,
我是一个新的html开发人员.我编写了一个html脚本程序来查看给定URL的特定网站.在将网页加载到应用程序视图中之后,我使用scllBy()函数自动滚动网页的内容.在我的应用程序中打开URL后,scllBy()函数不起作用?
以下是我的样例代码,如果有人能告诉我我的样例程序出了什么问题?以下是我的html文件:
选择 | 换行 | 行号
- <html> <head> <title>
- Web page auto scroll Test
- </title> </head> <script type="text/javascript">
- function pageScroll()
- {
- window.scrollBy(0,1);
- scrolldelay = setTimeout('pageScrol()',20);
- }
- </script> <body style='background-color:#FFFFFF' onload="startTime()"> <script type="text/javascript">
- var ContextWindow = window.open("http://search.yahoo.com/search?ei=utf-8&fr=slv8-i3752&p=scrolling%20issue&type=",
- '_main','width=100%,height=92%, position=bottom, resizable=0,scrollbars=auto,toolbar=0,status=0');
- pageScroll();
- </script> </body> </html>