回 帖 发 新 帖 刷新版面

主题:好奇怪的问题 谁知道原因?

下面这段vbscript代码是要在一个table里放8副图片 每副图片都做了个超链接
并且同时把这个图片的名字传到要连接的那个页面里
链接没问题为什么名字传不出去了(这段代码是想实现点击一个图片链接另一个页面来显示该图的具体信息) 代码如下:
<table cellSpacing = "1" cellPadding = "1" align = "center" border = "0" frame=void bordercolor="#ADFF2F">
                      <%
                          Dim n                        
                          Dim i
                          Dim j
                          Dim l
                          Dim setPhonePic
                          l = 1
                          n = "NokiaN93i"
                         for i=1 to 2
                             Response.Write("<tr>")
                             for j=1 to 4
                                 setPhonePic = "<td width = 160 height = 205>"
                                 setPhonePic = setPhonePic & "<table cellSpacing = 0 bordercolor=#ADFF2F cellPadding = 0 align = center border = 0>"
                                 setPhonePic = setPhonePic & "<tr><td width = 60% align =center >"
                                 setPhonePic = setPhonePic & "<font size=4><xmp>"&array(l)&"</xmp></font>"
                                 setPhonePic = setPhonePic & "<a href=phonePage.asp?thePhoneIs = "&array(l)&">"   
                                 setPhonePic = setPhonePic & "<img  src=phones/"&array(l)&".jpg width = 110 height = 180 border=0></a></td></tr>"  
                                 setPhonePic = setPhonePic & "</table></td>"
                                 response.write(setPhonePic)
                                 l = l+1
                             next 
                         next
                     %>
                        
                  </table>

回复列表 (共3个回复)

沙发

setPhonePic = setPhonePic & "<a href=phonePage.asp?thePhoneIs = "&array(l)&">" 
  关键就在这一句,难道用response.write()写在html里面和手工写的有什么不同吗???? 可以链接到指定的页面 但是array(l)的值传不过去!!!

板凳

你的array(1)是什么东西?数组吗?好象不能用array来定义数组名吧?

3 楼

你先不要用array(1)这..你用aray随便传个变量测试一下..如果还是不行的话..那就有问题..如果行的话..那就不传递数组..

我来回复

您尚未登录,请登录后再回复。点此登录或注册