function Carousel(){
this.prevbtn=$('#prevbtn');
var _self=this;
this.prevbtn.click(function(){
_self.piclist.animate({
alert(_self); //error
})
})
}
var z=new Carousel();
已经加载了JQ,这里的_self为什么会报错呢?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
animate里面要么是参数obj,要么是回调函数吧,你写的这个是什么