<script>
$(function () {
$("#btnLogin").click(function () {
$.ajax({
type: 'POST',
url: "/acl/user/LoginByUsername",
data: {
USER_NAME: $("#username").val(), PASSWORD: $(":password").val()
},
success: function (data) {
if (data.SUCCESS == true)
{
location.href = "/art/Content";
}
else
{
alert(data.MESSAGE);
}
},
dataType: 'json',
error: function (xhr, textStatus) {
console.log('错误')
console.log(xhr)
console.log(textStatus)
},
complete: function (data) {
console.log('结束'+ data)
}
});
});
});
</script>