如何制作 PHP 错误消息弹出窗口而不是新页面?
目前在我的网站上有一个表格,一旦提交,您就会进入一个带有感谢信息的空白屏幕。
我不想移动到新页面,而是希望让我的用户保持在同一页面上。我该如何创建弹出窗口并使用户保持在同一页面内?
Currently on my website I have a form in which once it is submitted, you're taken to a blank screen with the appreciation message.
Instead of moving to a new page, I wish to keep my users on the same page. How might I go about creating a popup and keeping the user within the same page?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 JavaScript 验证或 HTML5。
如果您不想要这些方式,您可以打开一个弹出窗口并将表单的目标设置为它。像这样 :
You can use javascript validation or HTML5.
If you don't want these ways you can just open a popup window and set your form's target to it. Like this :
尝试这个进行验证
try this for validation