Execution of script statements and commands by default is done in context of the top-level window. If you are using frames, use the "cd()" console command.
Cd ()
不带参数调用 cd ()将返回到顶级窗口。
Cd (窗口)
Allows you to change command-line expression evaluation from the default top-level window of the webpage to the window of a frame.