Php 显示模态而不是回显消息 if(mysqli\u num\u行($res\u用户名)>0){ //echo“对不起……用户名已被占用”; echo“$('#registerModel').model('show')”; } 你注册成功了!
对于echo部分,我想显示一个显示弹出窗口的模式,而不是echo消息。 有人帮忙吗?请将脚本放在$(document).ready()中,以便仅在文档完全加载时执行show命令以限制失败 如:Php 显示模态而不是回显消息 if(mysqli\u num\u行($res\u用户名)>0){ //echo“对不起……用户名已被占用”; echo“$('#registerModel').model('show')”; } 你注册成功了!,php,html,Php,Html,对于echo部分,我想显示一个显示弹出窗口的模式,而不是echo消息。 有人帮忙吗?请将脚本放在$(document).ready()中,以便仅在文档完全加载时执行show命令以限制失败 如: if (mysqli_num_rows($res_username) > 0) { //echo "Sorry... Username already taken"; echo "<script>$('#RegisterModal').modal('show')</
if (mysqli_num_rows($res_username) > 0) {
//echo "Sorry... Username already taken";
echo "<script>$('#RegisterModal').modal('show')</script>";
}
<div id="RegisterModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
You have sucess registered!
</div>
</div>
</div>
echo”
$(文档).ready(函数(){
$('#registerModel').model('show'))
});
";
您面临的问题是什么?确保您的模式脚本得到响应。并确保加载了所有必需的include文件。
echo "
<script>
$( document ).ready(function() {
$('#RegisterModal').modal('show')
});
</script>";