欢迎访问 水平网    今天是:2018年01月16日 注册 | 登录 | 订阅 | 收藏
>> JavaScript >> Javascript+css做的slider,需要prototype.js支持
推荐代码
热点代码

Javascript+css做的slider,需要prototype.js支持

作者:未知,  来源:网络,  阅读:821,  发布时间:2014-05-09  【放入收藏夹

 示例见本站首页吧!

代码:javascript复制
var CurrentHotScreen = 0 ;
function setMovieFlashs(screen,MaxScreen) {
	var Vmotion = "forward" ;
	if (screen >= MaxScreen) {
		screen = 0 ;
		Vmotion = "reverse" ;
	}
	cleanallstyle(MaxScreen);
	document.getElementById("focus_"+screen).className = "up" ;

	if(null!=flash_goaler.filters){
		flash_goaler.filters[0].apply();
		flash_goaler.filters[0].motion = Vmotion;
	}
	for (i=0;i<MaxScreen;i++) {
		document.getElementById("switch_"+i).style.display = "none" ;
	}
	document.getElementById("switch_"+screen).style.display = "block" ;
	if(null!=flash_goaler.filters){
		flash_goaler.filters[0].play();
	}
	CurrentHotScreen = screen ;
}

function aSlider(MaxScreen){
	aSliderTimer = null;
	setMovieFlashs(CurrentHotScreen+1,MaxScreen);
	aSliderTimer = setTimeout('aSlider(MaxScreen);', 5000);
}

function cleanallstyle(MaxScreen) {
	for (i = 0; i < MaxScreen; i++) {
		document.getElementById("focus_"+i).className = "" ;
	}
}
function show_focus_image(index,MaxScreen) {
	clearTimeout(aSliderTimer);
	setMovieFlashs(index,MaxScreen);
	aSliderTimer = setTimeout('aSlider(MaxScreen);', 5000);
}
Tags:sliderprototype
您可能还有兴趣查阅的内容
评论【共有0条评论】查看所有评论
昵称:(*)   邮箱:   QQ:   验证码: 看不清楚?点击刷新验证码