function objSP_Article() {this.ImgUrl=""; this.LinkUrl=""; this.Title="";}
function SlidePic_Article(_id) {this.ID=_id; this.Width=0;this.Height=0; this.TimeOut=5000; this.Effect=23; this.TitleLen=0; this.PicNum=-1; this.Img=null; this.Url=null; this.Title=null; this.AllPic=new Array(); this.Add=SlidePic_Article_Add; this.Show=SlidePic_Article_Show; this.LoopShow=SlidePic_Article_LoopShow;}
function SlidePic_Article_Add(_SP) {this.AllPic[this.AllPic.length] = _SP;}
function SlidePic_Article_Show() {
  if(this.AllPic[0] == null) return false;
  document.write("<div align='center'><a id='Url_" + this.ID + "' href='' target='_blank'><img id='Img_" + this.ID + "' style='width:" + this.Width + "px; height:" + this.Height + "px; filter: revealTrans(duration=2,transition=23);' src='javascript:null' border='0'></a>");
  if(this.TitleLen != 0) {document.write("<br><span id='Title_" + this.ID + "'></span></div>");}
  else{document.write("</div>");}
  this.Img = document.getElementById("Img_" + this.ID);
  this.Url = document.getElementById("Url_" + this.ID);
  this.Title = document.getElementById("Title_" + this.ID);
  this.LoopShow();
}
function SlidePic_Article_LoopShow() {
  if(this.PicNum<this.AllPic.length-1) this.PicNum++ ;  
  else this.PicNum=0;  
  if(isIE==true){
  this.Img.filters.revealTrans.Transition=this.Effect;  
  this.Img.filters.revealTrans.apply();  
  }
  this.Img.src=this.AllPic[this.PicNum].ImgUrl;
  if(isIE==true){
  this.Img.filters.revealTrans.play();
  }
  this.Url.href=this.AllPic[this.PicNum].LinkUrl;
  if(this.Title) this.Title.innerHTML="<a href="+this.AllPic[this.PicNum].LinkUrl+" target='_blank'>"+this.AllPic[this.PicNum].Title+"</a>";
  this.Img.timer=setTimeout(this.ID+".LoopShow()",this.TimeOut);
}
//-->
</script>  
<script language=JavaScript>
  <!--
var SlidePic_817 = new SlidePic_Article("SlidePic_817");
SlidePic_817.Width = 490;
SlidePic_817.Height = 254;
SlidePic_817.TimeOut = 5000;
SlidePic_817.Effect = 23;
SlidePic_817.TitleLen = 0;
var oSP = new objSP_Article();
oSP.ImgUrl = "/Article/UploadFiles/201008/2010082920445878.jpg" ;
oSP.LinkUrl = "/Article/ShowArticle.asp?ArticleID=122";
oSP.Title = "1";
SlidePic_817.Add(oSP);
var oSP = new objSP_Article();
oSP.ImgUrl = "/Article/UploadFiles/201008/2010082921012806.jpg";
oSP.LinkUrl = "/Article/ShowArticle.asp?ArticleID=121";
oSP.Title = "2";
SlidePic_817.Add(oSP);
var oSP = new objSP_Article();
oSP.ImgUrl = " Article/UploadFiles/201008/2010082920391995.jpg ;
oSP.LinkUrl = " /Article/ShowArticle.asp?ArticleID=123 ";
oSP.Title = "3";
SlidePic_817.Add(oSP);
var oSP = new objSP_Article();
oSP.ImgUrl = " /Article/UploadFiles/201008/2010082921362135.jpg ";
oSP.LinkUrl = "/Article/ShowArticle.asp?ArticleID=119";
oSP.Title = "4";
SlidePic_817.Add(oSP);
var oSP = new objSP_Article();
oSP.ImgUrl = "Article/UploadFiles/201008/2010082016562455.jpg";
oSP.LinkUrl = "/Article/ShowArticle.asp?ArticleID=120";
oSP.Title = "5";
SlidePic_817.Add(oSP);
SlidePic_817.Show();

解决方案 »

  1.   


    if(this.TitleLen != 0) {document.write("<br><span id='Title_" + this.ID + "'></span></div>");}
      else{document.write("</div>");}修改成if(this.TitleLen != 0) {document.write("<br><span id='Title_" + this.ID + "'></span></div>");}
      else{document.write("<a id='Url_" + this.ID + "' href='' target='_blank'>【1】</a>【2】【3】【4】【5】</div>");}
      

  2.   

    或者document.write("<a id='Url_" + this.ID + "' href='' target='_blank'>【1】</a>【2】【3】【4】【5】");
    if(this.TitleLen != 0) {document.write("<br><span id='Title_" + this.ID + "'></span></div>");}
      else{document.write("</div>");}