The XMLHttpRequest.onreadystatechange property contains the event handler to be called when the readystatechange event is fired, that is every time the readyState property of the XMLHttpRequest changes. The callback is called from the user interface thread.
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/onreadystatechange
http://www.w3school.com.cn/ajax/ajax_xmlhttprequest_onreadystatechange.asp
可以看作C语言的函数指针,这条语句相当于
request.addEventListener('readystatechange', function () {
...
})
10 回答11.7k 阅读
2 回答3.2k 阅读✓ 已解决
8 回答6.5k 阅读
4 回答2.2k 阅读✓ 已解决
3 回答1.2k 阅读✓ 已解决
2 回答2.5k 阅读✓ 已解决
4 回答701 阅读✓ 已解决
不是~~
是将一个匿名函数赋值给一个对象的某个属性,或将一个对象的某个属性指向一个匿名函数对象
javascript中函数式一等公民,可以赋值给任何变量及一个对象的任何属性