why moveBy and moveTo not working in my code?

前端 未结 1 612
时光说笑
时光说笑 2021-01-28 21:36

I think it is an easy questions but I am new in JavaScript

Why buttons \"but3\" and \"but4\" not working when I try moveBy or moveTo a new window?

thanks

1条回答
  •  孤独总比滥情好
    2021-01-28 22:12

    The error message says

    Permission denied to access property 'moveBy'
    

    To access the properties of another window, it needs to be in the same domain.

    Your code works if you replace www.google.com with a file in the same directory.

    0 讨论(0)
提交回复
热议问题