Author: Wang Ergou blog: Dig gold, think not, zhihu, Jane book, CSDN like again, form a habit, a daily series will be updated all the time, your support is the biggest power I continue to share π
If you need to remember too much, you can use the simplified version.
The full version:
var request = new XMLHttpRequest()
request.open('GET'.'/a/b/c? name=ff'.true);
request.onreadystatechange = function () {
if(request.readyState === 4 && request.status === 200) {
console.log(request.responseText); }}; request.send();Copy the code
Simplified version:
var request = new XMLHttpRequest()
request.open('GET'.'/a/b/c? name=ff'.true)
request.onload = (a)= > console.log(request.responseText)
request.send()
Copy the code
Tell yourself that even if you are tired, don’t forget to learn. There is no shortcut to success, only step by step. ‘!