<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