var intervald = setInterval(function (){
console.log('----');
},1000);
//清除计时器
clearInterval(intervalId);
-----------------------------------------
var element = document.getElementById('button');
function onClick(event) {
element.innerHtml = 'text';
}
element.addEventListener('click', onClick);
element.removeEventListener('click', onClick);
element.parentNode.removeChild(element);