简体   繁体   English

我如何获得引导模态工作?

[英]How do I get bootstrap modal working?

Below is the html 下面是html

<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="styles/bootstrap.min.css" />
<link rel="stylesheet" type="text/css"
href="styles/bootstrap-theme.min.css" />

<script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>
<script type="text/javascipt" src="js/bootstrap.min.js"></script>
</head>
<body>
<button type="button" class="btn btn-primary btn-lg"
    data-toggle="modal" data-target="#myModal">Launch demo modal
</button>

<!-- Modal for file filter -->
<div class="modal fade" id="myModal" 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"
                    aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">Modal title</h4>
            </div>
            <div class="modal-body">...</div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary">Apply</button>
            </div>
        </div>
    </div>
</div>
</body>
</html>

I've already looked up answers for the same question. 我已经查找了相同问题的答案。 Solutions for the same recommend loading jquery.js before bootstrap.js. 相同的解决方案建议在bootstrap.js之前加载jquery.js。 Mine doesn't work inspite of taking care of the same. 我的不管工作,尽管照顾。

EDIT Am now using bootstrap-3.3.4 and jquery-2.1.3 编辑我现在正在使用bootstrap-3.3.4和jquery-2.1.3

remove 去掉

     type="text/javascipt" 

from bootstrap.min.js script. 来自bootstrap.min.js脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM