web前端|js教程
图片轮换,javascript
web前端-js教程
手游平台网站源码,ubuntu 安装icu,axis2tomcat冲突,爬虫 python工资,php随机生成一个整数,铜梁区seo推广费用是多少lzw
java在线投票系统源码,VScode单步调试c代码,ubuntu键盘卡死,tomcat线程池名称,爬虫jupyter教学,php练习代码,邵武有效的seo联系方式,万能网站模板lzw
网页版问卷调查系统源码,ubuntu 好用的笔记,爬虫可以封锁吗,kmscheck php,seo做法总结lzw
function $(v){return document.getElementById(v)}
var img = $(“bimg”).getElementsByTagName(“div”);
var td = $(“simg”).getElementsByTagName(“td”);
var text = $(“info”).getElementsByTagName(“div”);
var now = 1;
var count = 3; //设置数量
var def = 0; //默认显示
var speed = 1000; //10秒
//initialize
for(var i=0;i<count;i++){//tdtd[i].name = i;td[i].className = "";td[i].onclick = function (){changeBar(this.name)}td[i].onmouseover = function(){clearAuto()}td[i].onmouseout = function(){setAuto()}//img img[i].style.display = "none";img[i].onmouseover = function(){clearAuto()}img[i].onmouseout = function(){setAuto()}//texttext[i].style.display = "none";text[i].onmouseover = function(){clearAuto()}text[i].onmouseout = function(){setAuto()} } //set default td[def].className = "s"; img[def].style.display = "block"; text[def].style.display = "block"; function setClass(v){for(var i=0;i<count;i++) td[i].className = "";td[v].className = "s"; } function setImg(v){ try{ with (bimg){ filters[0].Apply(); for(var i=0;i<count;i++){ img[i].style.display = "none";text[i].style.display = "none"; } img[v].style.display = "block"; text[v].style.display = "block"; filters[0].play(); }}catch(e){ for(var i=0;i<count;i++){ img[i].style.display = "none"; text[i].style.display = "none"; } img[v].style.display = "block"; text[v].style.display = "block";} } //contorl changed function changeBar(v){setClass(v);setImg(v);now= v+1; } //set Auto var auto = \; function setChange(){if(now<count){ changeBar(now); }else{ now = 0; changeBar(now);} } function setAuto(){auto = setInterval("setChange()", speed)} function clearAuto(){clearInterval(auto)} setAuto();
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]