通过按钮单击打开新选项卡后继续JavaScript

发布于 2025-01-27 04:31:43 字数 289 浏览 3 评论 0原文

我很安静地对javaScript,需要您有关以下问题的帮助: 我已经写了一本JavaScript,每周件上午7点会自动订阅健身课。 我必须单击一个正在打开新标签的按钮,我必须填写我的个人数据。新标签的URL是可变的,所以我不能通过

window.open(URL,"_self")

有没有办法在新标签中继续脚本或在同一选项卡中打开网站?

谢谢!

I'm quiet new to JavaScript and need your help concerning the following problem:
I've written a JavaScript to subscribe automatically to a gym class every monday at 7 a.m..
I have to click a button that's opening a new tab where I have to fill my personal data. The URL of the new tab is variable so I cant do it via

window.open(URL,"_self")

Is there a way to continue the script in the new tab or open the website in the same tab?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

生生不灭 2025-02-03 04:31:43

由于提到的异议,这对我来说听起来并不可行 - 至少以这种形式。如果您想在外部网站上运行脚本,那么只需使用浏览器解决方案,例如:

)删除您的注册。

如果您想在不做任何事情的情况下完全自动化此功能,那么您将无法避免使用Puppeteer的( https://github.com/puppeteer/puppeteer )每X天运行。

Because of the objections mentioned, that doesn't sound feasible to me - at least in this form. If you want to run a script on the external website, then simply use a browser solution such as:

There you can install your script and have it automatically fill out your registration.

If you want to automate this completely without doing anything on your part, then you will not be able to avoid an (external server-side) solution such as a NodeJS application with puppeteer (https://github.com/puppeteer/puppeteer) running every X days.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文