打开模态时如何设置URL

发布于 2025-01-21 18:03:06 字数 271 浏览 1 评论 0原文

打开模式时,我想将变量传递到URL中。为此,我正在使用jQuery设置URL,然后打开模式。

现在我的问题是,即使我尝试使用jQuery .modal('show')打开模态,即使模态正在关闭

value = 5;
window.location = 'http://localhost:8080/gorr/send.php?o=histlist&sid=value;
$('#sendCertificatesModal').modal('show');

I would like to pass a variable into the url when the modal is opened. To achieve that i'm using jquery to set url and then open the modal.

Now my problem is that the modal is getting closed even if i try to open it with jquery .modal('show')

value = 5;
window.location = 'http://localhost:8080/gorr/send.php?o=histlist&sid=value;
$('#sendCertificatesModal').modal('show');

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文