【发布时间】:2019-07-21 16:07:29
【问题描述】:
当用户电子邮件不在数据库中时,我想显示模式。
我写$('.ui.basic.modal').modal('show');
php$echo。
它没有显示。
在语义 UI 模式示例中,模式显示在运行代码按钮单击上。
语义 UI 示例链接
https://semantic-ui.com/modules/modal.html
我正在使用语义 UI 模式。
//PHP Code
if(!result)
{
echo "<script>$('.ui.basic.modal').modal('show');</script>";
}
//MyModal
<div class="ui basic modal">
<div class="ui icon header">
<i class="frown outline icon"></i>
Cannot find your email?
</div>
<div class="content">
<p>You are still on waiting list.</p>
</div>
</div>
【问题讨论】:
-
您能否澄清并验证您的 PHP 代码是否真的在回显您的脚本标签?您是否还可以验证您的代码是否加载了 Semantic UI 的脚本?
-
语义 UI 的脚本已加载。
标签: javascript php semantic-ui modalviewcontroller