ASP高手请进....

来源:百度知道 编辑:UC知道 时间:2024/05/18 03:30:31
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<!--最新图文代码开始-->
<script language="JavaScript">
<!--
var flag=false;
function DrawImage(ImgD){
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0){
flag=true;
if(image.width/image.height>= 105/80){
if(image.width>105){
ImgD.width=105;
ImgD.height=(image.height*105)/image.width;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
ImgD.alt="点击查看详细信息...";
}
else{
if(image.height>80){
ImgD.height=80;
ImgD.width=(image.width*80)/image.height;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
ImgD.alt="点击查看详细信息...";
}
}
}
//-->
</script>
&

<%
set cnn=server.CreateObject("adodb.connection")
cnn.provider="Microsoft.jet.oledb.4.0"
cnn.connectionstring="data source=" & server.MapPath("db.mdb")
cnn.open

set rs=server.CreateObject("adodb.recordset")
%>

<table>
<%rs.open "select username from [user]",cnn,1,1
hang=3
lie=3
rs.pagesize=hang*lie
p=request("p")
if p="" then p=1
rs.absolutepage=p
for i=1 to hang%>
<tr>
<%for j=1 to lie%>
<%if not rs.eof then%>
<td><%=rs(0)%></td>
<%rs.movenext
else%>
<td></td>
<%end if
next%>
</tr>
<%next
rs.close%>
</table>
<a href="?p=<%=p+1%>">下一</a>
这是一个可以分行的代码,你看看,可不可以用