angular.js - js 点击事件onclick=“”,引号内的函数名字 可以为 变量吗
仅有的幸福
仅有的幸福 2017-05-15 16:58:06
0
3
688

我这样添加的li元素的

怎么才能把click设为cancelTaskEve()

仅有的幸福
仅有的幸福

reply all(3)
漂亮男人

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;

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template