当前位置:沸点梦工场 > 网页设计教程 > Dreamweaver教程 > 浏览文章

用Dreamweaver和ACCESS开发制作新闻发布系统

59HOT收集整理 2008年01月28日 【字体:
 

这是最后一节,来个简单的结尾.

点此在新窗口浏览图片screen.width-333) {this.width=screen.width-333;this.title='open new window';}" border=0 ;>

这个在上节课已经讲解这个代码了,就是倒叙排列表中的记录!

点此在新窗口浏览图片screen.width-333) {this.width=screen.width-333;this.title='open new window';}" border=0 ;>

在这个代码中,我列出来
</tr>
<%do while not rs.eof%>
<tr>
<td height="28" align="left">  <img src="images/page.gif" width="12" height="14"> <a href=xh_look.asp?id=<%=rs("id")%> target="_blank"><%=rs("title")%></a>  (<font color="#006699"><%=rs("xhtime")%>发表</font>) <font color="#006699"> 浏览过<%=rs("xhcount")%>次</font></td>
</tr>
<%
rs.movenext
loop
%>
</table>

这个do while not rs.eof 主要就是循环,然后和loop之间的代码就是反复输出记录!
not rs.eof判断记录有没有到结尾,如果没有继续输入!

好了,下面是新闻页面xh_look.asp

点此在新窗口浏览图片screen.width-333) {this.width=screen.width-333;this.title='open new window';}" border=0 ;>

这句主要是判断传递过来的参数是否为空,如果不是就赋值给参数,如果是空就赋值1

点此在新窗口浏览图片screen.width-333) {this.width=screen.width-333;this.title='open new window';}" border=0 ;>

自写一个参数,主要用来替换换行代码!

点此在新窗口浏览图片screen.width-333) {this.width=screen.width-333;this.title='open new window';}" border=0 ;>

sql="select * from erennew where id="&id
rs.open sql,db,1,3
rs("xhcount")=rs("xhcount")+1
rs.update

上一页
本文共 7 页,第  [1]  [2]  [3]  [4]  [5]  [6]  [7]  页