有关交互式链接,谢谢

setcdq9801的专栏 2002-08-16 12:14:28
我用以下asp代码实现了交互式链接,请问我如何把它单独的每个链接放进一个单元格中
这样就管理就非常方便了!

<% set myobj=server.createobject("mswc.nextlink") %>
   <font face="CommercialScript BT"> </font>
</blockquote>
<uL>
<%
FOR I=1 to myobj.getlistcount("list.txt")
%>
<LI type=disc ><a href=rtsp://172.16.0.1/<% =myobj.getnthurl("list.txt",I) %> >
<% =myobj.getnthdescription("list.txt",I) %> </A>
<% next %>
</ul>
...全文
70 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
list.txt文件内容为

smi/01.smi FAMILY ALBUM USA 01
smi/02.smi FAMILY ALBUM USA 02
smi/03.smi FAMILY ALBUM USA 03
smi/06.smi FAMILY ALBUM USA 03
smi/04.smi FAMILY ALBUM USA 05
smi/05.smi FAMILY ALBUM USA 06
smi/07.smi FAMILY ALBUM USA 07
smi/08.smi FAMILY ALBUM USA 08
smi/09.smi FAMILY ALBUM USA 09
smi/10.smi FAMILY ALBUM USA 10
smi/11.smi FAMILY ALBUM USA 11
smi/12.smi FAMILY ALBUM USA 11


两列用TAB键分开

就可以实现了

这一是个超链接的例子,希望你谁也有帮助

谢谢

cmsoft(韦小宝是我的老乡)

thinkover(至真宝)
freezwy(网络自由人)
MeXP(秦汉风)

以及所有关注此问题的朋友
以后还有问题向你们请教的

  • 打赏
  • 举报
回复
解决了,结贴

贴出我的源代码

<html>
<title>测试</title>
<BODY>
<% set myobj=server.createobject("mswc.nextlink") %>
<table border=1>
<%
j=0
FOR i=1 to myobj.getlistcount("list.txt")
url1=myobj.getnthurl("list.txt",i)
explain=myobj.getnthdescription("list.txt",i)

if j mod 3=0 then
Response.Write "<tr><td width='250'><div align='center'>"
else
Response.Write "<td width='250'><div align='center'>"
end if
%>
<a href=rtsp://172.16.0.1/<% =url1 %> >
<% response.write explain %> </A>
<%
j=j + 1
if j mod 3=0 then
Response.Write "</td></tr>"
else
Response.Write "</td>"
end if
next

%>
<tr>
</table>
</body>
</html>
freezwy 2002-08-16
  • 打赏
  • 举报
回复
使用表格来限定就是了。
一般的格式如下:
<table>
<tr>
<%循环%>
<td><%=连接的值%></td>
<%中止循环%>
</tr>
</table>
qisanyou 2002-08-16
  • 打赏
  • 举报
回复
回不了留言,只好贴到这里,以下代码跟此贴无关.

function scrollnow() {
if (on){
if (x < limdex & x >= 0 ) {
parent.frames[0].scroll(x,0);

x = x + 1;
setTimeout('scrollnow()', 18);<----8改成18就慢了很多
}
......................
MeXP 2002-08-16
  • 打赏
  • 举报
回复
不知是不是这个意思
<% FOR I=1 to myobj.getlistcount("list.txt") %>
<tr>
<td>
<a href=rtsp://172.16.0.1/<%=myobj.getnthurl("list.txt",I)%>>
<% =myobj.getnthdescription("list.txt",I) %></A>
</td>
</tr>
<% next %>
cmsoft 2002-08-16
  • 打赏
  • 举报
回复
<table border=1>
<% set myobj=server.createobject("mswc.nextlink") %>
   <font face="CommercialScript BT"> </font>
</blockquote>
<uL>

<%
FOR I=1 to myobj.getlistcount("list.txt")
%>
<LI type=disc >
<tr> <td><a href=rtsp://172.16.0.1/<% =myobj.getnthurl("list.txt",I) %> >
<% =myobj.getnthdescription("list.txt",I) %> </A> </td></tr>
<% next %>
</ul>
</table>
cmsoft 2002-08-16
  • 打赏
  • 举报
回复
你自己改一下吧,这个我已经试过成功了
<table border=1>
<%
j=0
FOR i=0 to 9
if j mod 3=0 then
Response.Write "<tr><td width='150'><div align='center'>"
else
Response.Write "<td width='150'><div align='center'>"
end if
%>
<a href=rtsp://172.16.0.1/<%=i%>><% =i %></A>
<%
j=j + 1
if j mod 3=0 then
Response.Write "</td></tr>"
else
Response.Write "</td>"
end if
next

%>
<tr>
</table>
cmsoft 2002-08-16
  • 打赏
  • 举报
回复

<%
j=0
FOR I=1 to myobj.getlistcount("list.txt")
if j mod 3=0 then
Response.Write "<tr><td width='150'><div align='center'>"
else
Response.Write "<td width='150'><div align='center'>"
end if
%>

<a href=rtsp://172.16.0.1/<%=myobj.getnthurl("list.txt",I)%>>
<% =myobj.getnthdescription("list.txt",I) %></A>
<%
j=j + 1
response.write "</td>"
end if
next
%>
</tr>

cmsoft 2002-08-16
  • 打赏
  • 举报
回复
以前写的一个例子,自己看看@_@
<%
if j mod 3=0 then
Response.Write "<tr><td width='150'><div align='center'>"
else
Response.Write "<td width='150'><div align='center'>"
end if

Response.Write "<a href='javascript:CallPage(""" & id & """,""" & ver & """)'><img src="&smallpicurl&" alt='" & proname & "' border='0'></a></font></div><br><font size='2'><div align='center'>"&proname&"</div></font></td>"

rs.MoveNext
rsnum=rsnum+1

Response.Write "</table>"
%>
  • 打赏
  • 举报
回复
不行呀!
cmsoft 2002-08-16
  • 打赏
  • 举报
回复
if tds mod 3=0 then '按楼上的应该是这样子
JavaCoffee 2002-08-16
  • 打赏
  • 举报
回复
要修改一下:
<tr>
<td>
<%
tds=0
FOR I=1 to myobj.getlistcount("list.txt")
%>
<a href=rtsp://172.16.0.1/<%=myobj.getnthurl("list.txt",I)%>>
<% =myobj.getnthdescription("list.txt",I) %></A>
<%
tds=tds + 1
if tds=3 then
response.write "</td></tr><tr><td>"
    tds=0
end if
next
%>
</td>
</tr>

表示每3列换一行。
JavaCoffee 2002-08-16
  • 打赏
  • 举报
回复
试试下面这样:
<tr>
<td>
<%
tds=0
FOR I=1 to myobj.getlistcount("list.txt")
%>
<a href=rtsp://172.16.0.1/<%=myobj.getnthurl("list.txt",I)%>>
<% =myobj.getnthdescription("list.txt",I) %></A>
<%
tds=tds + 1
if tds=3 then
response.write "</td></tr><tr><td>"
end if
next
%>
</td>
</tr>

表示每3列换一行。
  • 打赏
  • 举报
回复
分数加到200!
求解!
  • 打赏
  • 举报
回复
to cmsoft(韦小宝是我的老乡)
谢谢,不过这样只能实现表只有一列
to MeXP(秦汉风)
你的也一样,只有一列,我想自己设置表有几行几列,然后让它自动填进去,请问怎么办?

freezwy(网络自由人)
有点不懂你的意思

28,391

社区成员

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

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