首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >#Bootstrap 3.2.0 #模态对话框#jquery

#Bootstrap 3.2.0 #模态对话框#jquery
EN

Stack Overflow用户
提问于 2016-07-09 21:57:21
回答 1查看 1.1K关注 0票数 0

以下是没有弹出模式对话框的代码。我正在使用Bootstrap 3.2.0和jquery也在1.9.0以上。帮助我如果我错过了something.And,请让我知道任何进一步的信息,并提前感谢。

代码语言:javascript
复制
<div class="modal fade" id = "login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">
            <span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModal">Login or Registeration </h4>
      </div>
      <div class="modal-body">
        <form action="#" method="POST">
          <div class="form-group">
            <input type="email" class="form-control" placeholder="Email">
          </div>
          <div class="form-group">
            <input type="password" class="form-control" placeholder="Password">
          </div>
          <div class="form-group">
            <input type="submit" class="btn btn-primary" value="Login">
            <input type="submit" class="btn btn-primary" value="Register">
          </div>
          </form>
        </div>
        <div class="modal-footer">
          <a href="#" class="btn btn-primary" data-dismiss="modal">
            Forgot Password?</a>
        </div>
      </div>
    </div>
  </div>


<div class="jumbotron" id="home">
  <div class="container-fluid">
    <h1>The Design Store</h1>
    <p>fdgdhfjgkhloj;jlkhhjgfdshjkl
      sgdhfjgkhkjlrtyguuhjkoxcvbn
      dgfhmb,nm,asdfghjkl;';lklkjhjhgfddfghjhg'..</p>
      <p>wefrgdthyjgukiosdfghjkgh
        ssdfghjklertyuwertyuicvbnm,
        sdfghjklsdfghjkljjhgfdsdfghjkjhgddsadfg</p>
        <p><a href="#" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#login">My Account</a></p>
  </div>
</div>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-07-09 22:33:54

就标记而言,一切都是正确的(下面的链接指向视图)。确保在bootstrap.js脚本之前包含jquery.js脚本。

Working demo of your code

代码语言:javascript
复制
<div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">
                    <span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModal">Login or Registeration </h4>
            </div>
            <div class="modal-body">
                <form action="#" method="POST">
                    <div class="form-group">
                        <input type="email" class="form-control" placeholder="Email">
                    </div>
                    <div class="form-group">
                        <input type="password" class="form-control" placeholder="Password">
                    </div>
                    <div class="form-group">
                        <input type="submit" class="btn btn-primary" value="Login">
                        <input type="submit" class="btn btn-primary" value="Register">
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <a href="#" class="btn btn-primary" data-dismiss="modal">
            Forgot Password?</a>
            </div>
        </div>
    </div>
</div>
<div class="jumbotron" id="home">
    <div class="container-fluid">
        <h1>The Design Store</h1>
        <p>fdgdhfjgkhloj;jlkhhjgfdshjkl sgdhfjgkhkjlrtyguuhjkoxcvbn dgfhmb,nm,asdfghjkl;';lklkjhjhgfddfghjhg'..
        </p>
        <p>wefrgdthyjgukiosdfghjkgh ssdfghjklertyuwertyuicvbnm, sdfghjklsdfghjkljjhgfdsdfghjkjhgddsadfg
        </p>
        <p><a href="#" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#login">My Account</a></p>
    </div>
</div>
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38282577

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档