html开发日记-form button

                    <form action="#" id="loginForm">
                        <div class="form-group">
                            <label class="control-label" for="username">用户名</label>
                            <input type="text" placeholder="example@gmail.com" title="Please enter you username" required="" value="" name="username" id="username" class="form-control">
                            <span class="help-block small">请输入您的用户名</span>
                        </div>
                        <div class="form-group">
                            <label class="control-label" for="password">密码</label>
                            <input type="password" title="Please enter your password" placeholder="******" required="" value="" name="password" id="password" class="form-control">
                            <span class="help-block small">请输入您的密码</span>
                        </div>
                        <div class="checkbox">
                            <input type="checkbox" class="i-checks" checked>
                                  记住登陆
                            <p class="help-block small">(注意密码安全)</p>
                        </div>
                        <button class="btn btn-success btn-block" Login="Login">登陆</button>
                        <a class="btn btn-default btn-block" href="#">注册</a>

                    </form> html

<script> 安全

$(function(){ ui

    $("Login^=Login").on('click',function(){ spa

        location.href="other.html"; orm

}): htm

}); ip

</script> input

竟然不跳转。。。神奇问题,后面发现button放在form中无论用,修改成a或者input type=“button”就行了 it

相关文章
相关标签/搜索