ASP代码分析 帮满 分析下动态代码 的作用和意思

来源:百度知道 编辑:UC知道 时间:2024/05/28 14:12:14
简单的 代码分析。

<!--#include file="conn.asp"-->
<html>
<head>
<title></title>
<style type="text/css">

</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body>
<div align="center" class="STYLE2">
<%
set rss=server.createobject("adodb.recordset")
sqls="select * from class order by id asc"
rss.open sqls,conn,1,1
%>
<table width="800" border="0" cellpadding="1" cellspacing="1" bordercolor="#FF0000">
<tr bordercolor="#CCCCCC">
<td bgcolor="#999999" class="STYLE2"><div align="center"><a href="index.asp"><br>
首页</a>
<%do u

上边的第一断ASP代码是生成导航,除首页以外都是新闻的类别

第二段ASP代码是循环出新闻类别,第三段是根据类别读出每类的前六条记录.

新闻的首页,大概就是显示拦目跟文章标题

<!--#include file="conn.asp"--> 包含conn.asp文件
<html>
<head>
<title></title>
<style type="text/css">

</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body>
<div align="center" class="STYLE2">
<%
set rss=server.createobject("adodb.recordset") 创建记录集实例
sqls="select * from class order by id asc" 变量赋值
rss.open sqls,conn,1,1 操作数据库
%>
<table width="800" border="0" cellpadding="1" cellspacing="1" bordercolor="#FF0000">
<tr bordercolor="#CCCCCC">
<td bgcolor="#999999" class="STYLE2"><div align="cente