怎样jsp接受到asp的值...新手在线等...

wjp16351 2008-11-22 09:20:29
代码:
见代码:
<script type="text/javascript">
<%
set rs=server.CreateObject("adodb.recordset")
rs.open("select * from ..."),conn,1,1
if rs.eof and rs.bof then
response.Write("新闻更新中..")
else
dim i
i=1
if i<6 then
do while not rs.eof
response.Write("imgurl"&i&"="&"../upload/"&rs("news_upload_url")&";")
response.Write("imgtext"&i&"="&replace(left(rs("news_title"),10)," ","")&";")
response.Write("imglink"&i&"=escape(news/news_news.asp?id="&rs("id")&");")
i=i+1
rs.movenext
loop
end if
end if
rs.close
%>
var focus_width=260
var focus_height=220
var text_height=20
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
________

我用response.write输出了imgurl、imglink和imgtext等,但下面却没接收到这些值...怎样解决...
...全文
81 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
sy_binbin 2008-11-22
  • 打赏
  • 举报
回复
http://topic.csdn.net/u/20081029/13/ccd1ef24-a6ac-4474-a918-01b14d52daea.html
还有这个
sy_binbin 2008-11-22
  • 打赏
  • 举报
回复
http://topic.csdn.net/u/20071220/11/f1dae6bb-dc9b-4ceb-91b6-ce9ef566f26d.html

你参考下这个帖子自己去写吧
sy_binbin 2008-11-22
  • 打赏
  • 举报
回复
晕,你要先弄明白JSP和JS脚本的关系

wjp16351 2008-11-22
  • 打赏
  • 举报
回复
不懂啊...能说详细点吗

这是源代码:
<a target=_self href="javascript:goUrl()"> <span class="f14b">
<script type="text/javascript">
imgUrl1="images/01.jpg";
imgtext1="蔬菜广告创意01"
imgLink1=escape("http://www.dchk.com");
imgUrl2="images/02.jpg";
imgtext2="蔬菜广告创意02"
imgLink2=escape("http://www.dchk.com");
imgUrl3="images/03.jpg";
imgtext3="蔬菜广告创意03"
imgLink3=escape("http://www.dchk.com");
imgUrl4="images/04.jpg";
imgtext4="蔬菜广告创意04"
imgLink4=escape("http://www.dchk.com");
imgUrl5="images/05.jpg";
imgtext5="蔬菜广告创意05"
imgLink5=escape("http://www.dchk.com");

var focus_width=298
var focus_height=240
var text_height=20
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

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>


就是一个图片不断轮播广告代码...我的意思是要从数据库中调出我的信息
imgUrl1="images/01.jpg"; 新闻图片地址
imgtext1="蔬菜广告创意01" 新闻标题
imgLink1=escape("http://www.dchk.com"); 新闻连接

怎样解决啊
银狐被占用 2008-11-22
  • 打赏
  • 举报
回复
用URL传进去。

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧