ajax 返回的數據 視頻返回的是對象 我打印出來是字符串
$("#login").on("click",?function(){
?$.ajax({
???url:?'/login',
???dataTYpe:?'json',
???data:?{
????username:?$("#username").val(),
????password:?$("#password").val(),
???},
???success:?function(res){
?????console.log(res)
?????console.log(typeof(res))
?????if(res.status?==?1){
???????Location.href='admin.html'
?????}
?????alert(res.msg)
???}
??})
})
2022-03-08
你的dataType寫錯了