简体   繁体   English

使用Ajax成功单击提交按钮后,如何隐藏模式?

[英]How to hide modal after submit button successfully clicked using Ajax?

I am facing issues is modal dismiss after submit button is successfully called using ajax call. 我面临的问题是,使用ajax调用成功调用了提交按钮后,模态关闭。

$('#myModal').detach(); $('#myModal').remove(); $('#myModal').close();

modal dismiss and not able to click anywhere 模态解散并且无法单击任何位置

According to the official bootstrap documentation at: 根据官方的引导文档,位于:

https://getbootstrap.com/docs/4.1/components/modal/#methods https://getbootstrap.com/docs/4.1/components/modal/#methods

Please try: 请试试:

$('#myModal').modal('hide')

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

相关问题 单击提交按钮后如何隐藏和显示页面 (HTML) - How to hide and show a page after the submit button is clicked (HTML) 在表单验证并由ajax提交后,如何禁用或隐藏“提交”按钮? - How to disable or hide submit button after form validate and submited by ajax? 如何隐藏标签,直到单击“提交”按钮? - How to hide labels until the submit button is clicked? 使用Laravel 5.2在第二个模式上单击“提交”按钮时,如何重定向到第一个模式? - How to redirect to the first modal when submit button on the second modal clicked using Laravel 5.2? 成功提交Ajax表单后停止Ladda按钮旋转 - Stop Ladda button spin after successfully submit ajax form 在单击提交按钮后使用PHP进行验证失败时,防止引导程序模式消失 - Preventing bootstrap modal from disappearing in case validation failure using PHP after submit button is clicked 单击提交按钮以进行引导模式和 parsley.js 验证后如何防止页面重新加载? - How to prevent page reload after submit button clicked for bootstrap modal and parsley.js validation? 我的 Ajax 脚本在提交后不隐藏 Bootstrap Modal - My Ajax script not hide Bootstrap Modal after submit 单击后隐藏按钮 - Hide button after clicked 单击提交按钮后的AJAX定期轮询数据 - AJAX periodical polling data after submit button is clicked
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM