我这样添加的li元素的
怎么才能把click设为cancelTaskEve()
cancelTaskEve()It is best to use function cancelTaskEve(){}. var cancelTaskEve=function(){} This way of writing may cause problems if the function is used before it is declared.
Okay, just do it like this<p onclick="cancelTaskEve()"></p>
ele.onclick = cancelTaskEve;
cancelTaskEve()
It is best to use function cancelTaskEve(){}.
var cancelTaskEve=function(){} This way of writing may cause problems if the function is used before it is declared.
Okay, just do it like this
<p onclick="cancelTaskEve()"></p>
ele.onclick = cancelTaskEve;