<script>
a = function autoPlay (c) {
console.log(c)
// console.log(this.mark)
this.mark++;
if (this.mark == $img.length) {
this.mark = 0;
return
}
}
function play() {
this.time = setInterval(a(1), 1000);
}
</script>
this.time = setInterval(a(1), 1000);是错误写法
正确的写法应该是this.time = setInterval("a(1)", 1000);