绕过后数据确认框?
我正在从事某个项目,但我遇到了一个主要问题。我正在编写一些在网络上执行某些操作的代码,例如发布数据。但总是发生什么:页面上的 JavaScript 代码在我发布数据后重新加载页面,因此它会要求确认。我只是想知道,有什么办法可以做到这一点吗?我正在使用 C# 和 WatIn。我自己也想了一些办法:
- 禁用所有消息框,似乎对这个框不起作用。
- 检测该框何时出现,然后按取消,但我不知道这是否可能?
- 查看 Javascript 代码,当它尝试调用 Reload 方法时会拦截该内容或其他内容吗?
- 其他一些禁用此自动重新加载的设置? (我想尝试了一些名为 METAreload 的东西,但没有成功)
谷歌没有给我我需要的信息,我已经搜索了很长一段时间了。有人知道如何摆脱这个阻止我的程序的框吗?
Ik working on some project, and there is one main problem I have. I'm writing some code that is performing some actions on the web, like posting data. But what happens all the time: Javascript code on the pages reload the page, just after i posted data, so it will ask for confirmation. I just need to know, is there any way at all to do this? I'm using C# with WatIn. I've thought of some ways myself:
- Disabling all message boxes, doesn't seem to work for this box.
- Detect when the box shows up and then press cancel, but I don't know if that's possible?
- Look in the Javascript code and when it tries to call the Reload method intercept that or something?
- Some other setting that disables this auto-reload? (tried some thing called METAreload i think but didn't work)
Google doesn't give me the information I need, I have been searching on this for quite a while now. Someone knows how to get rid of this box blocking my program?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我终于自己修好了。有一个 javascript 函数可以在计时器为 0 时重新加载页面。只需将 javascript 放入 URL 栏中,我就可以将该函数 bij 替换为空函数,现在它不会再重新加载了!
Ok, I finally fixed it myself. There was a javascript function that would make the page reload when the timer was at 0. Just by putting javascript in the URL bar i could replace that function bij an empty one, and now it won't reload anymore!