
ASP 下面这个程序调出来的图片是竖着的 怎么样让他调出来横向排列啊
<!--#includefile="inc/conn.asp"--><%functioncutstr(tempstr,tempwid)iflen(tempstr)>tem...
<!--#include file="inc/conn.asp"-->
<%
function cutstr(tempstr,tempwid)
if len(tempstr)>tempwid then
cutstr=left(tempstr,tempwid)&"..."
else
cutstr=tempstr
end if
end function%>
<html>
<head>
<title>图片新闻</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="mt_style.css">
</head>
<body>
<%
t=0
sql="select top 2 * from news where firstImageName<>'' and ok=true order by id desc"
set rs=conn.execute(sql)
rs.Open sql,conn,1,1
if not Rs.eof then
do while not rs.eof
t=t+1
%>
<table width=958 height=100 align=center class=border01 bgcolor=#FFFFFF>
<tr>
<td width="88%" align="center"><a href="shownews.asp?id=<%=rs("id")%>" target="_blank" ></a><a href="shownews.asp?id=<%=rs("id")%>" target="_blank" ><img src="<%=trim(rs("firstImageName"))%>" width="123" height="108" border="0"></a><a href="shownews.asp?id=<%=rs("id")%>" target="_blank" ></a></td>
</tr>
</table>
<%
if t>=11 then exit do
rs.movenext
loop
else
response.write "<tr><td align=center colspan=2 bgcolor=#E8E8F4>尚无收录</td></tr>"
end if
rs.close
set conn=nothing
%>
在那里修改换行啊 再问一下 横向排列之后的间距能均匀吗?第一个和其他的间距有点不相同 展开
<%
function cutstr(tempstr,tempwid)
if len(tempstr)>tempwid then
cutstr=left(tempstr,tempwid)&"..."
else
cutstr=tempstr
end if
end function%>
<html>
<head>
<title>图片新闻</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="mt_style.css">
</head>
<body>
<%
t=0
sql="select top 2 * from news where firstImageName<>'' and ok=true order by id desc"
set rs=conn.execute(sql)
rs.Open sql,conn,1,1
if not Rs.eof then
do while not rs.eof
t=t+1
%>
<table width=958 height=100 align=center class=border01 bgcolor=#FFFFFF>
<tr>
<td width="88%" align="center"><a href="shownews.asp?id=<%=rs("id")%>" target="_blank" ></a><a href="shownews.asp?id=<%=rs("id")%>" target="_blank" ><img src="<%=trim(rs("firstImageName"))%>" width="123" height="108" border="0"></a><a href="shownews.asp?id=<%=rs("id")%>" target="_blank" ></a></td>
</tr>
</table>
<%
if t>=11 then exit do
rs.movenext
loop
else
response.write "<tr><td align=center colspan=2 bgcolor=#E8E8F4>尚无收录</td></tr>"
end if
rs.close
set conn=nothing
%>
在那里修改换行啊 再问一下 横向排列之后的间距能均匀吗?第一个和其他的间距有点不相同 展开
展开全部
<!--#include file="inc/conn.asp"-->
<%
function cutstr(tempstr,tempwid)
if len(tempstr)>tempwid then
cutstr=left(tempstr,tempwid)&"..."
else
cutstr=tempstr
end if
end function%>
<html>
<head>
<title>图片新闻</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="mt_style.css">
</head>
<body>
<%
t=0
sql="select top 2 * from news where firstImageName<>'' and ok=true order by id desc"
set rs=conn.execute(sql)
rs.Open sql,conn,1,1
if not Rs.eof then
%>
<table width=958 height=100 align=center class=border01 bgcolor=#FFFFFF>
<tr>
<%
do while not rs.eof
t=t+1
%>
<td width="88%" align="center"><a href="shownews.asp?id=<%=rs("id")%>" target="_blank" ></a><a href="shownews.asp?id=<%=rs("id")%>" target="_blank" ><img src="<%=trim(rs("firstImageName"))%>" width="123" height="108" border="0"></a><a href="shownews.asp?id=<%=rs("id")%>" target="_blank" ></a></td>
<%
if t>=11 then exit do
rs.movenext
loop
%>
</tr>
</table>
<%
else
response.write "<tr><td align=center colspan=2 bgcolor=#E8E8F4>尚无收录</td></tr>"
end if
rs.close
set conn=nothing
%>
<%
function cutstr(tempstr,tempwid)
if len(tempstr)>tempwid then
cutstr=left(tempstr,tempwid)&"..."
else
cutstr=tempstr
end if
end function%>
<html>
<head>
<title>图片新闻</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="mt_style.css">
</head>
<body>
<%
t=0
sql="select top 2 * from news where firstImageName<>'' and ok=true order by id desc"
set rs=conn.execute(sql)
rs.Open sql,conn,1,1
if not Rs.eof then
%>
<table width=958 height=100 align=center class=border01 bgcolor=#FFFFFF>
<tr>
<%
do while not rs.eof
t=t+1
%>
<td width="88%" align="center"><a href="shownews.asp?id=<%=rs("id")%>" target="_blank" ></a><a href="shownews.asp?id=<%=rs("id")%>" target="_blank" ><img src="<%=trim(rs("firstImageName"))%>" width="123" height="108" border="0"></a><a href="shownews.asp?id=<%=rs("id")%>" target="_blank" ></a></td>
<%
if t>=11 then exit do
rs.movenext
loop
%>
</tr>
</table>
<%
else
response.write "<tr><td align=center colspan=2 bgcolor=#E8E8F4>尚无收录</td></tr>"
end if
rs.close
set conn=nothing
%>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询