一个企业网站首页的代码(实现三排三例)
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="description" content="<%= keywords %> " />
<meta name="keywords" content="<%= keywords %> " />
<meta name="copyright" content="<%= SiteUrl %>,<%= SiteName %>" />
<meta name="author" content="闽东企业信息网" />
<meta name="robots" content="all" />
<title><%= SiteTitle %></title>
<link href="css/index.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--#include file="head.asp"-->
<div id="body">
<div id="left"><img src="images/sy_05.jpg" width="199" height="37" alt="" /></div>
<div id="right"><img src="images/sy_06.jpg" width="579" height="37" alt="" /></div>
</div>
<div id="body">
<div id="list">
<%
exec="select * from procat order by value asc"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
if rs.eof then
response.write"<img src=img/a.gif width=10 height=10>现在还没有产品分类"
else
for i=1 to 8%>
<div id="cat">
<img src="images/a.gif" width="10" height="10" /> <a href='product.asp?action=lei&id=<%= rs("id") %>' ><%=rs("catname")%></a> </div>
<%rs.movenext
if rs.eof then
exit for
end if
next
end if%>
<%rs.close
set rs=nothing
%>
<div align="center"><img src="images/mycon.jpg" width="190" height="42" alt="" /></div>
<div id="contact">
电话:<%= tel %><br>
传真:<%= fax %><br>
手机:<%= sj %><br>
E-mail:<%= email %>
</div>
</div>
<div id="right">
<!--#include file="admin/inc/aboutbody.asp"-->
</div>
<div id="right"><div id="list6"><img src="images/showpro.jpg" width="190" height="42"></div>
</div>
<div id="right">
<%
exec="select * from list order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
if rs.eof then
response.write"没有记录"
else
if not rs.EOF and m<rs.PageSize then
colzs=3
rowzs=3
for i=1 to rowzs
if not rs.EOF then
%>
<div id="list5" >
<%for j=1 to colzs
if not rs.EOF and m<rs.PageSize then %>
<div id="list4" align="center"><a href="view.asp?action=pro&id=<%=rs("id")%>"><img src="<%= rs("spic") %>" alt="" width="100" height="100" border="0" /></a><br />
<a href="view.asp?action=pro&id=<%=rs("id")%>"><%= leftString(rs("name"),18) %></a></div>
<%rs.MoveNext
m=m+1
else%>
<%end if
next%>
</div>
<%end if
next
end if%>
<%end if%>
</div>
</div>
</div>
<!--#include file="copyright.asp"-->
</body>
</html>
我的代码是成功的!只不过,还是要为你哭泣!
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="description" content="<%= keywords %> " />
<meta name="keywords" content="<%= keywords %> " />
<meta name="copyright" content="<%= SiteUrl %>,<%= SiteName %>" />
<meta name="author" content="闽东企业信息网" />
<meta name="robots" content="all" />
<title><%= SiteTitle %></title>
<link href="css/index.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--#include file="head.asp"-->
<div id="body">
<div id="left"><img src="images/sy_05.jpg" width="199" height="37" alt="" /></div>
<div id="right"><img src="images/sy_06.jpg" width="579" height="37" alt="" /></div>
</div>
<div id="body">
<div id="list">
<%
exec="select * from procat order by value asc"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
if rs.eof then
response.write"<img src=img/a.gif width=10 height=10>现在还没有产品分类"
else
for i=1 to 8%>
<div id="cat">
<img src="images/a.gif" width="10" height="10" /> <a href='product.asp?action=lei&id=<%= rs("id") %>' ><%=rs("catname")%></a> </div>
<%rs.movenext
if rs.eof then
exit for
end if
next
end if%>
<%rs.close
set rs=nothing
%>
<div align="center"><img src="images/mycon.jpg" width="190" height="42" alt="" /></div>
<div id="contact">
电话:<%= tel %><br>
传真:<%= fax %><br>
手机:<%= sj %><br>
E-mail:<%= email %>
</div>
</div>
<div id="right">
<!--#include file="admin/inc/aboutbody.asp"-->
</div>
<div id="right"><div id="list6"><img src="images/showpro.jpg" width="190" height="42"></div>
</div>
<div id="right">
<%
exec="select * from list order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
if rs.eof then
response.write"没有记录"
else
if not rs.EOF and m<rs.PageSize then
colzs=3
rowzs=3
for i=1 to rowzs
if not rs.EOF then
%>
<div id="list5" >
<%for j=1 to colzs
if not rs.EOF and m<rs.PageSize then %>
<div id="list4" align="center"><a href="view.asp?action=pro&id=<%=rs("id")%>"><img src="<%= rs("spic") %>" alt="" width="100" height="100" border="0" /></a><br />
<a href="view.asp?action=pro&id=<%=rs("id")%>"><%= leftString(rs("name"),18) %></a></div>
<%rs.MoveNext
m=m+1
else%>
<%end if
next%>
</div>
<%end if
next
end if%>
<%end if%>
</div>
</div>
</div>
<!--#include file="copyright.asp"-->
</body>
</html>
我的代码是成功的!只不过,还是要为你哭泣!
我的网站首页顶部的排法效果在这里此站不能显示!
wpsni.f78.net 在baidu里,有收入文章了!
