EventObjects = {
settarget: null,
settype: null,
settime: null,
display: function() {
console.log(this.settarget);
console.log(this.settype);
console.log(this.settime);
}
}
obj1 = Object.create(EventObjects);
window.addEventListener("load", function(event) {
alert("Hello to our site ");
obj1.settarget = event.target;
obj1.settype = event.type;
obj1.settime = event.timeStamp;
obj1.display;
});
ask by Nada Ahmed translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…