点击登录按钮,用post方法成功获取到token后,怎么转到登陆界面
<form id="register" action="http://localhost:8000/api-token-auth/" method="post">
<h2>欢迎登录</h2>
<label for="name">Username</label><input type="text" id="name" name="name" />
<label for="pwd">Password</label><input type="password" id="pwd" name="pwd" />
<button onclick="login();return false">登录</button>
</form>
<script type="text/javascript">
function login(){
$.post("http://localhost:8000/api-token-auth/",{username: $("#name").val(),password: $("#pwd").val(),},
function(result) {console.log(result)})
}
</script>