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

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

首页图片新闻,从数据库中取数据,并且新闻的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.newstitle04.value;
imgLink4=escape(document.all.newsurl04.value);
//imgLink4= "http://www.163.com ";


//imgLink4=escape( "# ");
imgUrl5=document.all.news05.value;
imgtext5=document.all.newstitle05.value;
imgLink5=escape(document.all.newsurl05.value);
//imgLink5= "http://www.163.com ";
//imgLink5=escape( "# ");

  var   focus_width=272
  var   focus_height=230
  var   text_height=18
  var   swf_height   =   focus_height+text_height
 
  var   pics=imgUrl1+ "| "+imgUrl2+ "| "+imgUrl3+ "| "+imgUrl4+ "| "+imgUrl5
  var   links=imgLink1+ "| "+imgLink2+ "| "+imgLink3+ "| "+imgLink4+ "| "+imgLink5
  var   texts=imgtext1+ "| "+imgtext2+ "| "+imgtext3+ "| "+imgtext4+ "| "+imgtext5
//   alert(links);
  document.write( ' <object   classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 "   codebase= "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 "   width= " '+   focus_width   + ' "   height= " '+   swf_height   + ' "> ');
  document.write( ' <param   name= "allowScriptAccess "   value= "sameDomain "> <param   name= "movie "   value= "focus.swf "> <param   name= "quality "   value= "high "> <param   name= "bgcolor "   value= "#F0F0F0 "> ');
  document.write( ' <param   name= "menu "   value= "false "> <param   name=wmode   value= "opaque "> ');
  document.write( ' <param   name= "FlashVars "   value= "pics= '+pics+ '&links= '+links+ '&texts= '+texts+ '&borderwidth= '+focus_width+ '&borderheight= '+focus_height+ '&textheight= '+text_height+ ' "> ');
  document.write( ' <embed   src= "pixviewer.swf "   wmode= "opaque "   FlashVars= "pics= '+pics+ '&links= '+links+ '&texts= '+texts+ '&borderwidth= '+focus_width+ '&borderheight= '+focus_height+ '&textheight= '+text_height+ ' "   menu= "false "   bgcolor= "#F0F0F0 "   quality= "high "   width= " '+   focus_width   + ' "   height= " '+   focus_height   + ' "   allowScriptAccess= "sameDomain "   type= "application/x-shockwave-flash "   pluginspage= "http://www.macromedia.com/go/getflashplayer "   /> ');     document.write( ' </object> ');
 

  </script>
</span> </a> <span   id= "focustext "   class= "f14b ">   </span>


运行之后是没有问题,问题是在打开新闻的连接地址的时候,取得的参数值中如果有中文,那么就取到的值是他的编码,而不是真正的汉字,请问这个问题怎么解决?


[解决办法]
顶MM一下``
[解决办法]
帮顶~~
[解决办法]
escape是对汉字进行编码处理。所以显示出来的不是汉字。你得用
unescape(str)进行解码才能得到啊。