2
谷歌浏览器执行 js 脚本打开新窗口如何在新窗口执行后续脚本
source link: https://www.v2ex.com/t/838377
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
window.open("http://www.baidu.com"); //在新窗口中打开网页 打开了一个新窗口 但是后面的脚本代码依旧在原来的窗口运行 如何在新窗口运行后续代码
谢谢
4 条回复 • 2022-03-06 17:14:10 +08:00
smallgoogle 58 分钟前
你这有点超出浏览器和 js 的范围了。
smallgoogle 57 分钟前
带参数过去,但是新页面也要接受参数,然后执行某些指定动作。
lybcyd 43 分钟前
自带的控制台应该是不能跨页面执行的,你可以用插件方式
autoxbc 43 分钟前
从描述看,楼主希望的这种操作大概率是非同源的,那么只能通过油猴或者扩展做到
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK