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>

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

  • 相关阅读:
    五、页脚footer
    一、页眉header
    四、(2)列布局+媒体查询
    二、导航栏nav
    coredns介绍
    pandas指定列索引和行索引
    学习笔记246—国家自然科学基金申请书写作攻略【收藏】
    Axios请求传参的格式
    NodeJspm2常用命令
    FastAPI实现谷歌DialogFlow 接口问答批量导入导出和批量删除 DialogFlow batch import and export Q&A interface
  • 原文地址:https://www.cnblogs.com/LionsEyes/p/8971574.html
Copyright © 2011-2022 走看看