日期:2014-05-17  浏览次数:21066 次

首页图片新闻,从数据库中取数据,并且新闻的URL地址有参数,请问怎样传递参数?
首页图片新闻,从数据库中取数据,并且新闻的URL地址有参数,请问怎样传递参数?

先是从数据库中取得数据:
图片:
tp1=Trim(rs_TP( "Picture "))
新闻标题:
tpt1=Trim(rs_TP( "title "))
新闻连接地址:
tpu1= "shownews.asp?showtype=News&id= "&   rs_TP( "id ")   & "&showclass= "&   Trim(rs_TP( "classname "))

然后,把这些变量的值放在了隐藏文本框中,
<input   name= "news01 "   type= "hidden "   value= " <%=   tp1   %> "   />
<input   name= "news02 "   type= "hidden "   value= " <%=   tp2   %> "   />
<input   name= "news03 "   type= "hidden "   value= " <%=   tp3   %> "   />
<input   name= "news04 "   type= "hidden "   value= " <%=   tp4   %> "   />
<input   name= "news05 "   type= "hidden "   value= " <%=   tp5   %> "   />

<input   name= "newstitle01 "   type= "hidden "   value= " <%=   tpt1   %> "   />
<input   name= "newstitle02 "   type= "hidden "   value= " <%=   tpt2   %> "   />
<input   name= "newstitle03 "   type= "hidden "   value= " <%=   tpt3   %> "   />
<input   name= "newstitle04 "   type= "hidden "   value= " <%=   tpt4   %> "   />
<input   name= "newstitle05 "   type= "hidden "   value= " <%=   tpt5   %> "   />

<input   name= "newsurl01 "   type= "hidden "   value= " <%=   tpu1   %> "   />
<input   name= "newsurl02 "   type= "hidden "   value= " <%=   tpu2   %> "   />
<input   name= "newsurl03 "   type= "hidden "   value= " <%=   tpu3   %> "   />
<input   name= "newsurl04 "   type= "hidden "   value= " <%=   tpu4   %> "   />
<input   name= "newsurl05 "   type= "hidden "   value= " <%=   tpu5   %> "   />


,下面就是轮番显示的JS代码了:


<a   target= "_self "   href= "javascript:goUrl() ">   <span   class= "f14b ">
<script   type= "text/javascript ">
imgUrl1=document.all.news01.value;
imgtext1=document.all.newstitle01.value;
imgLink1=escape(document.all.newsurl01.value);
//imgLink1= "http://www.163.com ";
//alert(escape(imgLink1));
//imgLink1=escape( "# ");
imgUrl2=document.all.news02.value;
imgtext2=document.all.newstitle02.value;
imgLink2=escape(document.all.newsurl02.value);
//imgLink2= "http://www.126.com ";
//imgLink2=escape( "# ");
imgUrl3=document.all.news03.value;
imgtext3=document.all.newstitle03.value;
imgLink3=escape(document.all.newsurl03.value);
//imgLink3= "http://www.163.com ";
//imgLink3=escape( "# ");
imgUrl4=document.all.news04.value;
imgtext4=document.all.ne