如何在代码后面关闭bootstrap模式弹出窗口 [英] how to close bootstrap modal popup in code behind

查看:73
本文介绍了如何在代码后面关闭bootstrap模式弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有c#的asp.net。我有一个bootstrap模式弹出窗口。我想在后面的代码中关闭它。



这里我的代码:



 <   script     type   =  text / javascript >  
函数Closepopup(){
$('#mpSearch')。modal('close');

}
< / script >





代码背后



 ScriptManager.RegisterStartupScript( this ,GetType(), < span class =code-string> Close Modal Popup,  Closepopup(); true ); 







错误显示:TypeError:f [b]不是函数

解决方案

('#mpSearch')。modal('close');

}
< / script >





代码背后



 ScriptManager.RegisterStartupScript( this ,GetType(), < span class =code-string> Close Modal Popup,  Closepopup(); true ); 







错误显示:TypeError:f [b]不是函数


要关闭,请尝试


('#mpSearch ').modal(' 隐藏);

i'm using asp.net with c#. I have a bootstrap modal popup. I want to close it in code behind.

Here my code:

<script type="text/javascript">
     function Closepopup() {
         $('#mpSearch').modal('close');

     }
</script>



code behind

ScriptManager.RegisterStartupScript(this, GetType(), "Close Modal Popup", "Closepopup();", true);




Error shows : TypeError: f[b] is not a function

解决方案

('#mpSearch').modal('close'); } </script>



code behind

ScriptManager.RegisterStartupScript(this, GetType(), "Close Modal Popup", "Closepopup();", true);




Error shows : TypeError: f[b] is not a function


To close, try


('#mpSearch').modal('hide');


这篇关于如何在代码后面关闭bootstrap模式弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆