Files
ClassContent/历届学生/韩一伟/每天课程/2021-07-15/index.html
2024-09-27 02:06:13 +08:00

42 lines
953 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<ul></ul>
</body>
<!-- <script>
function callback(res) {
console.log(res);
}
</script>
<script src="http://127.0.0.1/index.php?test=callback"></script> -->
<script>
// 1拿出手机
var ajax = new XMLHttpRequest()
// 2: 输入号码
ajax.open("POST", "http://127.0.0.1/index.php")
// 3拨号
ajax.send()
// 4状态监听
ajax.onreadystatechange = function () {
if (ajax.readyState == 4) {
if (ajax.status == 200) {
console.log(ajax);
console.log(ajax.responseText);
} else {
console.log("抱歉,无法请求");
}
}
}
</script>
</html>