Cathy cfc7ad6282 TODOS(JQuery+Node+Mongo数据库) | hace 4 años | |
---|---|---|
.. | ||
model | hace 4 años | |
public | hace 4 años | |
router | hace 4 años | |
app.js | hace 4 años | |
package-lock.json | hace 4 años | |
package.json | hace 4 años | |
readme.md | hace 4 años |
这样写的话this指向的是触发事件元素本身 taskBox.on('click', '.destroy', function () {
console.log(this);
)};
这样写的话this指向的Window, 因为箭头函数不改变this指向 taskBox.on('click', '.destroy', () => {
console.log(this);
)};