本帖最后由 durongjian 于 2009-07-04 15:44:08 编辑

解决方案 »

  1.   

    图片信息好象是随着文字一起变的!~~~~~
    <SCRIPT language="">                     
    var widths=290;    /*显示高度*/                  
    var heights=230;   /*显示宽度*/                   
    var counts=6;              
    img1=new Image ();img1.src='http://bbs.jcwcn.com/attachments/month_0709/20070913_4ee8cb60b22fa9dd0279oTIV6fmTgIXw.jpg';
    img2=new Image ();img2.src='http://bbs.jcwcn.com/attachments/month_0709/20070913_bcfb127543dc1d08802d9KP0DGXyr9jT.jpg';
    img3=new Image ();img3.src='http://bbs.jcwcn.com/attachments/month_0709/20070913_cbc2b6daadb1cbe3e702j0H7isUi1QeX.jpg'; 
    img4=new Image ();img4.src='http://bbs.jcwcn.com/attachments/month_0709/20070913_ae854ce1c7892251fb03pRi4Ha91Ew7i.jpg'; 
    img5=new Image ();img5.src='http://bbs.jcwcn.com/attachments/month_0709/20070910_51df0edb78224d6370612fzMNYqX0tej.jpg';
    img6=new Image ();img6.src='http://bbs.jcwcn.com/attachments/month_0709/20070907_ba0162f23d630dfd9ca1TesqosYf60X6.jpg';        
    url1=new Image ();url1.src='http://www.jcwcn.com/html/PhotoShopImageReady/19_07_11_206.htm';
    url2=new Image ();url2.src='http://www.jcwcn.com/html/PhotoShopImageReady/19_36_05_750.htm';
    url3=new Image ();url3.src='http://www.jcwcn.com/html/PhotoShopImageReady/18_44_26_734.htm';  
    url4=new Image ();url4.src='http://www.jcwcn.com/html/PhotoShopImageReady/10_57_01_754.htm'; 
    url5=new Image ();url5.src='http://www.jcwcn.com/html/3dsmax/23_55_48_619.htm';                                         
    url6=new Image ();url6.src='http://www.jcwcn.com/html/PhotoShopImageReady/15_09_28_8.htm';       
    /* 建议将这块放置于JS中 下面的部分几乎是不需要任何改动*/
    var nn=1;
    var key=0;
    function change_img()
    {if(key==0){key=1;}
    else if(document.all)
    {
        document.getElementById("pic").filters.revealTrans.Transition=Math.floor(Math.random()*23)
        document.getElementById("pic").filters.revealTrans.apply();
        document.getElementById("pic").filters.revealTrans.play();
    }
    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>');
    document.write('.axx{padding:0px 7px 3px;*padding:1px 7px;border-left:#cccccc 1px solid;}');
    document.write('a.axx:link,a.axx:visited{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#666;}');
    document.write('a.axx:active,a.axx:hover{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#999;}');
    document.write('.bxx{padding:0px 7px 3px;*padding:1px 7px;border-left:#cccccc 1px solid;}');
    document.write('a.bxx:link,a.bxx:visited{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#D34600;}');
    document.write('a.bxx:active,a.bxx:hover{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#D34600;}');
    document.write('</style>');
    document.write('<div style="width:'+widths+'px;height:'+heights+'px;overflow:hidden;text-overflow:clip;">');
    document.write('<div><a id="url"><img id="pic" style="border:0px;filter:revealTrans" width='+widths+' height='+heights+' /></a></div>');
    document.write('<div style="filter:alpha(style=1,opacity=10,finishOpacity=80);-moz-opacity:0.8; opacity:0.8;background: #888888;width:100%-2px;text-align:right;top:-12px;position:relative;margin:1px;height:12px;padding:0px;margin:0px;border:0px;">');
    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>
      

  2.   

    老大,不行啊!这一句报错!
    document.getElementById("pic").filters.revealTrans.Transition=Math.floor(Math.random()*23)
    后面加上分号也不行!
      

  3.   

    对不起,我试了一下单独放在一个页面中没有问题!我放到.ASPX页面中就出问题,不知道为什么?