js 添加和移除onclick事件(经过匿名函数实现)及jquery 移除事件

代码以下:jquery

//移除事件
 document.getElementById('mobile-a').onclick=function(){};this

 

 //60秒后把sendCheckMsg事件加上
 setTimeout(function(){
                               $('.mobile-a').text("获取验证码");
                               document.getElementById('mobile-a').onclick=function(){  sendCheckMsg();};
                             
                          }, 60000);.net

 

 

参考连接:http://www.jb51.net/article/89215.htmhtm

 

jquery 移除事件:事件

$(this).removeAttr('onclick');rem

相关文章
相关标签/搜索