这一段js是什么意思function boom(callba
html5吧
全部回复
仅看楼主
level 3
Noobl℉ 楼主
这一段js是什么意思
function boom(callback){
//var that=this; //替换了上下文,但是没有使用this的意义.
var speed=this.getAttribute('speed');
this.timer=setInterval(function(){
this.style.opacity=0.1*(speed--)
if(speed<1){
if(this.parentNode){
this.parentNode.removeChild(this);
bnElements.splice(bnElements.lastIndexOf(this),1);
callback&&callback();
}
clearInterval(this.timer);
}
}.bind(this),30);
}
</script>
2018年12月20日 07点12分 1
level 3
Noobl℉ 楼主
没人????
2018年12月20日 10点12分 2
1