选项卡选项无法正常工作

时间:2014-03-13 18:15:35

标签: html tabs

<div class="" id="loginModal">
    <div class="modal-header">
        <h3>Have an Account?</h3>
    </div>
    <div class="modal-body">
        <div class="well">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#login" data-toggle="tab">Login</a></li>
                <li><a href="#create" data-toggle="tab">Create Account</a></li>
                <li><a href="#admin" data-toogle="tab">Login as admin</a></li>
            </ul>
            <div id="myTabContent" class="tab-content">
                <div class="tab-pane active in" id="login">
                    <form class="form-horizontal" action='' method="POST">
                        <fieldset>
                            <div id="legend">
                                <legend class="">Login</legend>
                            </div>    
                            <div class="control-group">
                                <!-- Username -->
                                <label class="control-label"  for="username"></label>
                                <div class="controls">
                                    <input type="text" id="username" name="username" placeholder="Username" class="input-xlarge">
                                </div>
                            </div>

                            <div class="control-group">
                                <!-- Password-->
                                <label class="control-label" for="password"></label>
                                <div class="controls">
                                    <input type="password" id="password" name="password" placeholder="Password" class="input-xlarge">
                                </div>
                            </div>


                            <div class="control-group">
                                <!-- Button -->
                                <div class="controls">
                                    <button class="btn btn-primary">Login</button>
                                </div>
                            </div>
                        </fieldset>
                    </form>                
                </div>
                <div class="tab-pane fade" id="admin">
                    <form class="form-horizontal" action='' method="POST">
                        <fieldset>
                            <div id="legend">
                                <legend class="">Sign as admin</legend>
                            </div>    
                            <div class="control-group">
                                <!-- Username -->
                                <label class="control-label"  for="username"></label>
                                <div class="controls">
                                    <input type="text" id="adminname" name="adminname" placeholder="Username" class="input-xlarge">
                                </div>
                            </div>

                            <div class="control-group">
                                <!-- Password-->
                                <label class="control-label" for="password"></label>
                                <div class="controls">
                                    <input type="password" id="adminpassword" name="adminpassword" placeholder="Password" class="input-xlarge">
                                </div>
                            </div>


                            <div class="control-group">
                                <!-- Button -->
                                <div class="controls">
                                    <button class="btn btn-primary">Login</button>
                                </div>
                            </div>
                        </fieldset>
                    </form>                
                </div>

                <div class="tab-pane fade" id="create">
                    <form id="tab">
                        <label>Username</label>
                        <input type="text" value="" class="input-xlarge">
                        <label>First Name</label>
                        <input type="text" value="" class="input-xlarge">
                        <label>Last Name</label>
                        <input type="text" value="" class="input-xlarge">
                        <label>Email</label>
                        <input type="text" value="" class="input-xlarge">
                        <label>Address</label>
                        <textarea value="Smith" rows="3" class="input-xlarge">
                        </textarea>

                        <div>
                            <button class="btn btn-primary">Create Account</button>
                        </div>
                    </form>

                </div>

            </div>

        </div>
    </div>

在这段代码中,我有三个标签(登录,创建帐户和以管理员身份登录),最后这个标签不起作用。当我点击Login as admin选项卡时,没有任何内容出现。我不知道问题在哪里,为什么标签不起作用,有人可以帮我解决问题吗?

0 个答案:

没有答案