For one of my lecture at university we are learning about callbacks, I half understand what they are but the question I have is where can you find the events for elements.
load in:
img1.addEventListener(’load’, function() {
// woo yey image loaded
});
yay in:
some_function("yay", function(value) {
console.log("callback called! " + value);
});
您可以在MDN 事件参考 中找到它们。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.