如下所示:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>js同一页面可多次调用的图片幻灯切换效果</title>
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<!--把下面代码加到<head>与</head>之间-->
<script language="javascript">
//声明命名空间
var $o = new Object();
//基础方法
$o.base = {
e:function(a,f){
for(var i=0,j=a.length;i<j;i++){f.call(a[i],i);}
}
}
$o. slide = function (id,arg){
var arg = arg||{},
t = document.getElementById(id),
a = t.getElementsByTagName("a"),
lis = [],
cl = arg.color||'#f30',
ctm = arg.time*1000||2000,
w = t.clientWidth,
h = t.clientHeight,
b = ['<ul style="margin:0; padding:0; list-style:none; display:block; position:absolute; bottom:10px; right:10px;">'],
index = 0,
$ = null,
$ = null;
function change(i){
if(!!$){clearTimeout($);}
index = !isNaN(i)"px";
},30)
};
}
function c(b,o){
o.style.backgroundColor = !!b"#fff";
o.style.color = !!b"#fff":cl;
}
function st(){
if(!!$)clearTimeout($);
$ = setTimeout(function(){change()},ctm);
}
with(t.style){overflow = 'hidden';position = 'relative';}
$o.base.e(a,function(n){
this.style.display = "block";
with(this.firstChild.style){borderWidth = '0';width = w + 'px';height = h + 'px';}
b.push('<li style="width:20px; height:20px; line-height:20px; display:block; float:left; margin-left:5px; border:1px solid ' + cl + '; background-color:#fff; color:' + cl +'; font-size:14px; text-align:center; cursor:pointer;">' + (n+1) + '</li>');
});
b.push('</ul>');
t.innerHTML += b.join("");
lis = t.getElementsByTagName("li");
$o.base.e(lis,function(n){
if(n == index){c(1,this)}
this.onmouseover = function(){
if(n!=index)change(n);
}
});
st();
}
</script>
</head>
<body>
<!--把下面代码加到<body>与</body>之间-->
<div id="aa" style="width:402px;height:228px;">
<a href="javascript:alert('1')"><img src="/UploadFiles/2021-04-02/1.jpg">

以上这篇JS焦点图,JS 多个页面放多个焦点图的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。

华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com

P70系列延期,华为新旗舰将在下月发布

3月20日消息,近期博主@数码闲聊站 透露,原定三月份发布的华为新旗舰P70系列延期发布,预计4月份上市。

而博主@定焦数码 爆料,华为的P70系列在定位上已经超过了Mate60,成为了重要的旗舰系列之一。它肩负着重返影像领域顶尖的使命。那么这次P70会带来哪些令人惊艳的创新呢?

根据目前爆料的消息来看,华为P70系列将推出三个版本,其中P70和P70 Pro采用了三角形的摄像头模组设计,而P70 Art则采用了与上一代P60 Art相似的不规则形状设计。这样的外观是否好看见仁见智,但辨识度绝对拉满。