zoukankan      html  css  js  c++  java
  • 使用BootStrap模态框瞬间消失,且点击没有事件的Button按钮会刷新页面

    布局时吧Button按钮放在了form表单中,导致进页面时,不做任何操作,首先点击三个Button按钮,会刷新页面,新增按钮本来有的 模态框 也不会弹出来会弹出并瞬间消失,以为是js冲突的原因,删除了BootStrap的js文件,还是同样的问题。

                <div class="col-md-8">
                    <form class="form-inline">
                      <div class="form-group">
                        <label for="exampleInputName2">姓名&nbsp;&nbsp;&nbsp;&nbsp;</label>
                        <input type="text" class="form-control" id="exampleInputName2" placeholder="Jane Doe">
                      </div>
                      &nbsp;&nbsp;&nbsp;&nbsp;
                      <div class="form-group">
                        <label for="exampleInputEmail2">邮箱&nbsp;&nbsp;&nbsp;&nbsp;</label>
                        <input type="email" class="form-control" id="exampleInputEmail2" placeholder="jane.doe@example.com">
                      </div>
                      
                      <button class="btn btn-info"><span class="glyphicon glyphicon-search"></span>&nbsp;查询</button>
                      <button class="btn btn-primary" id="emp_add_modal_btn"><span class="glyphicon glyphicon-plus"></span>&nbsp;新增</button>
                      <button class="btn btn-danger" id="emp_delete_btn"><span class="glyphicon glyphicon-trash"></span>&nbsp;删除</button>
                    </form>
                </div>

    当把三个Button按钮移出form表单,就没有出现上面的问题了

    <div class="row">
                <div class="col-md-8">
                    <form class="form-inline">
                      <div class="form-group">
                        <label for="exampleInputName2">姓名&nbsp;&nbsp;&nbsp;&nbsp;</label>
                        <input type="text" class="form-control" id="exampleInputName2" placeholder="Jane Doe">
                      </div>
                      &nbsp;&nbsp;&nbsp;&nbsp;
                      <div class="form-group">
                        <label for="exampleInputEmail2">邮箱&nbsp;&nbsp;&nbsp;&nbsp;</label>
                        <input type="email" class="form-control" id="exampleInputEmail2" placeholder="jane.doe@example.com">
                      </div>
                    </form>
                </div>
                <div class="col-md-4">
                    <button class="btn btn-info"><span class="glyphicon glyphicon-search"></span>&nbsp;查询</button>
                    <button class="btn btn-primary" id="emp_add_modal_btn"><span class="glyphicon glyphicon-plus"></span>&nbsp;新增</button>
                    <button class="btn btn-danger" id="emp_delete_btn"><span class="glyphicon glyphicon-trash"></span>&nbsp;删除</button>
                </div>
            </div>

    此篇只为记录自己开发路上的问题,望大神们多多指教。

  • 相关阅读:
    牛客寒假算法集训 1
    求逆序数——树状数组
    牛客网 被3整除的子序列 区间dp
    SICNU 2019 winter training #2(codeforces #531 Div3)
    iOS 给已有的类添加属性.
    coredata实践
    IOS 数据库升级
    获取当前屏幕显示的viewcontroller
    ios 自顶一个view
    mac 修改文件夹权限.
  • 原文地址:https://www.cnblogs.com/LionsEyes/p/8971574.html
Copyright © 2011-2022 走看看