readyState is 0 when generating xmlHttp, and changes when XMLHttpRequest.open, oepn will trigger onreadystatechange event.
The oepn is placed before onreadystatechange, and the onreadystatechange event is executed once less than after onreadystatechange.
The readyState property holds the state information of the server response. Whenever readyState changes, the onreadystatechange function will be executed.
Put it in the back, it will be executed once less
In AJAX, why onreadystate = function () should be written in front of open and send
Guess you like
Origin blog.csdn.net/weixin_44226263/article/details/103016186
Ranking