简体   繁体   English

页面上的模态弹出窗口

[英]Modal popup on the page

我有一个要求,我将在其中单击一个按钮并提交表单,但在两者之间想要显示一个对话框以向用户显示一些信息并发布继续提交操作的内容是否可能?

Yes, is that posible.是的,这可能吗。

U can try a message alert, for example, with sweetalert , sweetalert2 and much more!你可以尝试消息提醒,例如,使用sweetalertsweetalert2等等!

If you want to show a confirmation mesasge in the modal dialog then the submit action should be inside the modal dialog itself.如果您想在模态对话框中显示确认消息,那么提交操作应该在模态对话框本身内。

If it is something like:Are you sure you want to submit?如果是这样的:您确定要提交吗? then you can use the JavaScript confirm and return the result, ex:然后你可以使用 JavaScript 确认并返回结果,例如:

<input type="submit" onclick="return getDetails();"/>
<Script>
function getDetails()
{
return confirm("Are you sure ....");
}
</script>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM