js动态添加带参数的点击事件

来源:互联网 发布:linux 查看日志文件 编辑:程序博客网 时间:2024/06/06 01:43

如下:

function show(arg){    console.log(arg);}
var show=document.createElement("input");div.appendChild(show);show.type="button";show.value="查看";show.onclick=function(){    show(this)};

阅读全文
1 0
原创粉丝点击