使用setInterval方法可以改变间隔时间吗?
var sites = [
["http://localhost:8888/uploads/?img=Screen Shot 2016-06-02 at 21.30.32.png",1000],
["http://localhost:8888/uploads/?img=Screen Shot 2016-06-02 at 19.30.46.png",3000]
];
var currentSite = sites.length;
$(document).ready(function () {
var $iframe = $("iframe").attr("src",sites[0][0]);
setInterval(function() {
(currentSite == 0) ? currentSite = sites.length - 1 : currentSite = currentSite -1;
$iframe.attr("src",sites[currentSite][0]);
}, sites[currentSite][1]);
});