problem description
We usually use the arrow function to get the original this, but vice versa, if the js native dom operation, such as how to get its this if onclick uses the arrow function.
the environmental background of the problems and what methods you have tried
Native operation dom
related codes
/ / Please paste the code text below (do not replace the code with pictures)
the correct way not to use the arrow function
for (let i = 0; i < iconPlus.length; iPP) {
iconPlus[i].onclick = function () {
//this
clickInitModal(this);
}
}
the result I"m looking forward to.
how to get its click event this with the arrow function