<form action="#" id="loginForm">
<div class="form-group">
<label class="control-label" for="username">用户名</label>
<input type="text" placeholder="[email protected]" 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>
<script>
$(function(){
$("Login^=Login").on(‘click‘,function(){
location.href="other.html";
}):
});
</script>
居然不跳转。。。神奇问题,后面发现button放在form中不管用,修改为a或者input type=“button”就好了