<STYLE type=text/css>
.axx{padding:1px 7px;border-left:#cccccc 1px solid;}
a.axx:link,a.axx:visited{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#666;}
a.axx:active,a.axx:hover{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#999;}
.bxx{padding:1px 7px;border-left:#cccccc 1px solid;}
a.bxx:link,a.bxx:visited{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#D34600;}
a.bxx:active,a.bxx:hover{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#D34600;}
</STYLE><SCRIPT>
var widths=570;
var heights=164;
var counts=6;
img1=new Image ();img1.src='images/jscode/2007729214812897.jpg';
img2=new Image ();img2.src='images/jscode/2007729214813293.jpg';
img3=new Image ();img3.src='images/jscode/2007729214814549.jpg';
img4=new Image ();img4.src='images/jscode/2007729214814651.jpg';
img5=new Image ();img5.src='images/jscode/2007729214815914.jpg';
img6=new Image ();img6.src='images/jscode/2007729214816449.jpg';
url1=new Image ();url1.src='#';
url2=new Image ();url2.src='#';
url3=new Image ();url3.src='#';
url4=new Image ();url4.src='#';
url5=new Image ();url5.src='#';
url6=new Image ();url6.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();
}
</SCRIPT><div style="width:570px;height:204px;overflow:hidden;text-overflow:clip;">
<div><a id="url"><img id="pic" style="border:0px;filter:progid:dximagetransform.microsoft.wipe(gradientsize=1.0,wipestyle=4, motion=forward)" width=570 height=204 /></a></div>
<div style="filter:alpha(style=1,opacity=10,finishOpacity=80);background: #888888;width:100%-2px;text-align:right;top:-12px;position:relative;margin:1px;height:12px;padding:0px;margin:0px;border:0px;">
<!-- <a href="javascript:changeimg('1');" id=xxjdjj1 class="axx" target="_self">1</a>
<a href="javascript:changeimg('2');" id=xxjdjj2 class="axx" target="_self">2</a>
<a href="javascript:changeimg('3');" id=xxjdjj3 class="axx" target="_self">3</a>
<a href="javascript:changeimg('4');" id=xxjdjj4 class="axx" target="_self">4</a>
<a href="javascript:changeimg('5');" id=xxjdjj5 class="axx" target="_self">5</a>
<a href="javascript:changeimg('6');" id=xxjdjj6 class="axx" target="_self">6</a>
</div>
</div> --><SCRIPT>
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>把最下面的javascript去掉,恢复被注释掉的html,会出现不一样的情况,为什么呢。
.axx{padding:1px 7px;border-left:#cccccc 1px solid;}
a.axx:link,a.axx:visited{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#666;}
a.axx:active,a.axx:hover{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#999;}
.bxx{padding:1px 7px;border-left:#cccccc 1px solid;}
a.bxx:link,a.bxx:visited{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#D34600;}
a.bxx:active,a.bxx:hover{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#D34600;}
</STYLE><SCRIPT>
var widths=570;
var heights=164;
var counts=6;
img1=new Image ();img1.src='images/jscode/2007729214812897.jpg';
img2=new Image ();img2.src='images/jscode/2007729214813293.jpg';
img3=new Image ();img3.src='images/jscode/2007729214814549.jpg';
img4=new Image ();img4.src='images/jscode/2007729214814651.jpg';
img5=new Image ();img5.src='images/jscode/2007729214815914.jpg';
img6=new Image ();img6.src='images/jscode/2007729214816449.jpg';
url1=new Image ();url1.src='#';
url2=new Image ();url2.src='#';
url3=new Image ();url3.src='#';
url4=new Image ();url4.src='#';
url5=new Image ();url5.src='#';
url6=new Image ();url6.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();
}
</SCRIPT><div style="width:570px;height:204px;overflow:hidden;text-overflow:clip;">
<div><a id="url"><img id="pic" style="border:0px;filter:progid:dximagetransform.microsoft.wipe(gradientsize=1.0,wipestyle=4, motion=forward)" width=570 height=204 /></a></div>
<div style="filter:alpha(style=1,opacity=10,finishOpacity=80);background: #888888;width:100%-2px;text-align:right;top:-12px;position:relative;margin:1px;height:12px;padding:0px;margin:0px;border:0px;">
<!-- <a href="javascript:changeimg('1');" id=xxjdjj1 class="axx" target="_self">1</a>
<a href="javascript:changeimg('2');" id=xxjdjj2 class="axx" target="_self">2</a>
<a href="javascript:changeimg('3');" id=xxjdjj3 class="axx" target="_self">3</a>
<a href="javascript:changeimg('4');" id=xxjdjj4 class="axx" target="_self">4</a>
<a href="javascript:changeimg('5');" id=xxjdjj5 class="axx" target="_self">5</a>
<a href="javascript:changeimg('6');" id=xxjdjj6 class="axx" target="_self">6</a>
</div>
</div> --><SCRIPT>
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>把最下面的javascript去掉,恢复被注释掉的html,会出现不一样的情况,为什么呢。
我的意思是把
<!--
<a href="javascript:changeimg(1);" id="xxjdjj1" class="axx" target="_self">1</a>
<a href="javascript:changeimg(2);" id="xxjdjj2" class="axx" target="_self">2</a>
<a href="javascript:changeimg(3);" id="xxjdjj3" class="axx" target="_self">3</a>
<a href="javascript:changeimg(4);" id="xxjdjj4" class="axx" target="_self">4</a>
<a href="javascript:changeimg(5);" id="xxjdjj5" class="axx" target="_self">5</a>
<a href="javascript:changeimg(6);" id="xxjdjj6" class="axx" target="_self">6</a> </div>
</div> -->放开,把
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>');删除掉显示1,2,3,4,5,6等的时候效果不一样。按道理应该是一样的。