开发者

Can I get javascript to automatically click on a link on another page once that page loads?

开发者 https://www.devze.com 2023-03-28 00:52 出处:网络
I want to create a link on page A that links to page B and also clicks on a link on page B once page B has finished loading. Is this possible or would I have to code javascript on that specific page w

I want to create a link on page A that links to page B and also clicks on a link on page B once page B has finished loading. Is this possible or would I have to code javascript on that specific page where the link is开发者_运维技巧 supposed to be clicked on.


If you simply want to redirect to another page you can check the document.referrer on your site to see where the person came from (url) and then redirect with location.replace("http://example.com/myformpage.htm")


You're right, JS is pretty much run in contained environment (i.e., the original page).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号