I'm experimenting a bit with jQuery
<html>
<head>
<title>post test</title>
<script src="jquery-3.2.1.min.js"></script>
<script>
$.post('http://lab.anta40.net/dummy/login.php',
{
'username': 'John Doe',
'password': 'hello123'
},
function (response, status) {
alert(response.status);
}
);
</script>
</head>
<body>
test...
</body>
</html>
My intention is the page will display an alert box which contains the response of the POST request. Running the code on Chrome 61 doesn't yield anything. No alert box at all. What is wrong here?