Reputation: 28572
Can I use javascript code to mimic a user click a link and the page goes to the linked page? If so, how to do it?
Thanks
Upvotes: 0
Views: 107
Reputation: 4297
Call the .click()
method on the link.
document.getElementById('the-id-of-the-element').click();
Upvotes: 1