ngoquocdat `<script>
$(document).ready(function () {
$("#submit").click(function () {
$.ajax({
type: "POST",
dataType: "json",
data: $('#loginForm').serialize(),
url: "/user/login",
success: function (data) {
if (data.status == 1) {
location.href = '/';
} else {
$("#login_error").html('<div class="alert alert-danger">' + data.msg + '</div>');
}
}
});
});
});
</script>
<div name="login_error" id="login_error"></div>`
thay đoạn này vào, thiếu type data