<style type="text/css">
<!--
.a{
border:10px #fcc solid;
}
.b{
border:none;
}
-->
</style>
<div id="small">
<img src="" width="100" height="100" />
<img src="" width="100" height="100" />
<img src="" width="100" height="100" />
<img src="" width="100" height="100" />
</div>
<script type="text/javascript">
var a = document.getElementById("small");
var b = a.getElementsByTagName("img");
var i = 0;
function _clear(n) {
return function (){
for (var j=0; j < b.length; j++)
{
if (n!=j)
{
b[j].className = "b";//不等于显示当前边框的时候其边框为没有;
}
}
}
}
function img()
{
b[i].className = "a";
if(i>b.length-2)
{
i=0;
}
else
{
i++;
}
setTimeout(_clear(i),1000);
}
setInterval(img,1000);
</script>
<!--
.a{
border:10px #fcc solid;
}
.b{
border:none;
}
-->
</style>
<div id="small">
<img src="" width="100" height="100" />
<img src="" width="100" height="100" />
<img src="" width="100" height="100" />
<img src="" width="100" height="100" />
</div>
<script type="text/javascript">
var a = document.getElementById("small");
var b = a.getElementsByTagName("img");
var i = 0;
function _clear(n) {
return function (){
for (var j=0; j < b.length; j++)
{
if (n!=j)
{
b[j].className = "b";//不等于显示当前边框的时候其边框为没有;
}
}
}
}
function img()
{
b[i].className = "a";
if(i>b.length-2)
{
i=0;
}
else
{
i++;
}
setTimeout(_clear(i),1000);
}
setInterval(img,1000);
</script>