<script type="text/javascript">
var widths=300;
var heights=80;
var counts=2;
img1=new Image();img1.src='j1.jpg';
img2=new Image();img2.src='j2.jpg';
url1=new Image();url1.src='#';
url2=new Image();url2.src='#';
var nn=1;
var key=0;
function change_img(){
if(key==0){
key=1;
}else if(document.all) {
document.getElementById("pic").filters[0].Apply();document.getElementById("pic").filters[0].Play(duration=2);
}
eval('document.getElementById("pic").src=img'+nn+'.src');
eval('document.getElementById("url").href=url'+nn+'.src');
for (var i=1;i <=counts;i++){
document.getElementById("xxjdjj"+i).className='axx';
}
document.getElementById("xxjdjj"+nn).className='bxx';
nn++;if(nn>counts){
nn=1;
}
tt=setTimeout('change_img()',4000);
}
function changeimg(n){
nn=n;window.clearInterval(tt);change_img();
}
document.write('<style type="text/css">');
document.write('.axx,.bxx{display:inline-block;width:14px;height:6px;margin:0 4px;overflow: hidden;text-indent: -99px;border: 1px solid #a5a5a5;box-shadow: 0 0 1px #999;border-radius: 5px;-webkit-border-radius: 5px;-moz-border-radius: 5px;}');
document.write('a.axx:link,a.axx:visited{background-color:#F5F0E1;}');
document.write('a.axx:active,a.axx:hover{background-color:#999;}');
document.write('a.bxx:link,a.bxx:visited{background-color:#B5B5B5;}');
document.write('a.bxx:active,a.bxx:hover{background-color:#B5B5B5;}');
document.write('</style>');
document.write('<div style="width:'+widths+'px;height:115px;overflow:hidden;text-overflow:clip;margin:0px auto;padding-top:20px;text-align: center;">');
document.write('<div><a id="url"><img id="pic" style="border:0px;box-shadow: -2px 2px 2px #999;" width='+widths+' height='+heights+' /> </a> </div>');
document.write('<div style="margin-top:6px;">');
for(var i=1;i <counts+1;i++){
document.write('<a href="javascript:changeimg('+i+');" id="xxjdjj'+i+'" class="axx" target="_self">'+i+' </a>');
}
document.write('</div></div>');
change_img();
</script>
ecshop手机模板js就是不显示,有同学知道为什么吗?
var widths=300;
var heights=80;
var counts=2;
img1=new Image();img1.src='j1.jpg';
img2=new Image();img2.src='j2.jpg';
url1=new Image();url1.src='#';
url2=new Image();url2.src='#';
var nn=1;
var key=0;
function change_img(){
if(key==0){
key=1;
}else if(document.all) {
document.getElementById("pic").filters[0].Apply();document.getElementById("pic").filters[0].Play(duration=2);
}
eval('document.getElementById("pic").src=img'+nn+'.src');
eval('document.getElementById("url").href=url'+nn+'.src');
for (var i=1;i <=counts;i++){
document.getElementById("xxjdjj"+i).className='axx';
}
document.getElementById("xxjdjj"+nn).className='bxx';
nn++;if(nn>counts){
nn=1;
}
tt=setTimeout('change_img()',4000);
}
function changeimg(n){
nn=n;window.clearInterval(tt);change_img();
}
document.write('<style type="text/css">');
document.write('.axx,.bxx{display:inline-block;width:14px;height:6px;margin:0 4px;overflow: hidden;text-indent: -99px;border: 1px solid #a5a5a5;box-shadow: 0 0 1px #999;border-radius: 5px;-webkit-border-radius: 5px;-moz-border-radius: 5px;}');
document.write('a.axx:link,a.axx:visited{background-color:#F5F0E1;}');
document.write('a.axx:active,a.axx:hover{background-color:#999;}');
document.write('a.bxx:link,a.bxx:visited{background-color:#B5B5B5;}');
document.write('a.bxx:active,a.bxx:hover{background-color:#B5B5B5;}');
document.write('</style>');
document.write('<div style="width:'+widths+'px;height:115px;overflow:hidden;text-overflow:clip;margin:0px auto;padding-top:20px;text-align: center;">');
document.write('<div><a id="url"><img id="pic" style="border:0px;box-shadow: -2px 2px 2px #999;" width='+widths+' height='+heights+' /> </a> </div>');
document.write('<div style="margin-top:6px;">');
for(var i=1;i <counts+1;i++){
document.write('<a href="javascript:changeimg('+i+');" id="xxjdjj'+i+'" class="axx" target="_self">'+i+' </a>');
}
document.write('</div></div>');
change_img();
</script>
ecshop手机模板js就是不显示,有同学知道为什么吗?
