dpi10335 2018-07-19 07:54
浏览 117
已采纳

如何通过变量引导模态弹出窗口?

I am studying the bootstrap, and follow the example:

<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
    Shows the modal
</button>

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    模态框(Modal)标题
                </h4>
            </div>
            <div class="modal-body">
                在这里添加一些文本
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                </button>
                <button type="button" class="btn btn-primary">
                    提交更改
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

if I click the button the modal will popup, but I don't understand which variable is controlling the modal popup and disappear.

I want to through a variable to popup it. there is a requirement.

when I enter a Smarty page, if the page do not exists a access_token variable, I want the modal popup automatically.

So, how to realize in this example?

  • 写回答

2条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 有没有可以下载钉钉群文件视频的软件
      • ¥15 如何用LaTeX打出如下的表格
      • ¥15 程序填空补充完整的代码一共三题
      • ¥15 在MySQL中使用while建表,报错
      • ¥15 python导入pyautogui报错,网上也没有找到解决方法如何解决?
      • ¥15 关于IPSEC和NAT SERVER同时使用的情况下,该如何解决客户端访问服务器的问题
      • ¥15 eclipse项目在idea运行部署到云服务器
      • ¥100 sql server image类型转换
      • ¥15 关于matlab的问题
      • ¥15 数据结构二叉树——统计二叉树的结点、深度、叶子结点个数