Now there\'s quite a lot of similar-looking questions here, but I was wondering, what should I do, if I want not to just change the location of the window, but
location
Try a[0].click();
a[0].click();
This will execute the click method of the DOM element instead of triggering the event.
click