Bootstrap 3.1.1警报不解雇

时间:2014-02-19 14:03:27

标签: javascript css twitter-bootstrap-3

我无法弄清楚为什么警报框没有消失。包含bootstrap.js,我几乎逐字地使用了这个例子。我也没有在控制台中看到任何javascript错误。这是页面:

<!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title id="title">New User</title>
        <link href="/css/bootstrap.min.css" rel="stylesheet" />
        <link href="/css/bootstrap-theme.min.css" rel="stylesheet" />
        <link href="/css/newform.css" rel="stylesheet" />
        <link href="/css/ui-lightness/jquery-ui-1.10.4.custom.min.css" rel="stylesheet" />
        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
            <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>

    <body role="document">
        <section role="main" class="container">
            <div id="messages">
                <div class="alert alert-warning alert-dismissable">
                    <button type="button" class="close" data-dimiss="alert" aria-hidden="true">&times;</button> <span class="message">We already have a user with that email address.</span>

                </div>
            </div>
            <div id="main-body">
                <form action="/users" role="form" class="form-signin" method="POST">
                     <h2 class="form-signin-heading">New User</h2>

                    <label class="sr-only" for="email">E-mail</label>
                    <input id="email" class="form-control" type="email" name="email" value="email@email.com" required placeholder="E-mail Address" />
                    <label class="sr-only" for="password">Password</label>
                    <input id="password" class="form-control" type="password" name="password" value="password" required placeholder="Password" />
                    <input type="submit" class="btn btn-lg btn-primary btn-block" value="Sumbit"></input>
                </form>
            </div>
        </section>
        <script src="/js/jquery-1.11.0.min.js"></script>
        <script src="/js/jquery-ui-1.10.4.custom.min.js"></script>
        <script src="/js/bootstrap.min.js"></script>
    </body>

</html>

谢谢!

1 个答案:

答案 0 :(得分:3)

它应该是data-dismiss,你有data-dimiss