高分求动态网页,最简单的那种只要一个加一个查询功能。
要求一定要建一个access数据库。
比如一个留言本,可以查询留言就可以 了 。
问题点数:0、回复次数:5Top
1 楼xjy521(笑剑影)回复于 2003-06-02 19:05:07 得分 0
楼主的意思是动态建什么?Top
2 楼xjy521(笑剑影)回复于 2003-06-02 19:06:37 得分 0
添加留言:
<!--#include file="check.asp"-->
<!--#include file="data_con.asp"-->
<%
username=request("username")
liuyiantitle=trim(request("liuyiantitle"))
liuyiancontent=trim(request("liuyiancontent"))
timestr=date()
timestr=timestr&" "&time()
if liuyiantitle="" or liuyiancontent="" then
response.write " 对不起,你的留言没有填写完整!不能发表!"
else
mysql="insert into liuyian(用户名,标题,内容,发表时间) values('"&username&"','"&liuyiantitle&"','"&liuyiancontent&"','"×tr&"')"
myconn.execute(mysql)
myconn.close
response.write "<p> </p><div align=center><h3>你的留言发表成功,祝贺你!</h3>"
response.write "<p><a href=liuyian.asp><b>继续阅读留言</b></a></div>"
end if
%>
阅读留言:
<!--#include file="check.asp"-->
<!--#include file="data_con.asp"-->
<%
liuyiannum=CInt(trim(request.querystring("liuyiannum")))
username=trim(request.querystring("username"))
mysql="select * from liuyian where ID='"&liuyiannum&"'"
set rs=myconn.execute(mysql)
if rs.eof then
response.write "对不起,不存在这条记录!"
else
writer=rs("用户名")
liuyiantitle=rs("标题")
liuyiancontent=rs("内容")
liuyiantime=rs("发表时间")
end if
%>
<html>
<head>
<title>阅读留言</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000" background="../image/backimage.gif">
<div align=center>
<table border=1 width=90% height=80>
<tr>
<td width=15% height=16><font color="#0000ff" align=center>标题</font></td>
<td width=75% height=16><font size=3 color=red><b><%=liuyiantitle%></b></font></td>
</tr>
<tr>
<td width=15% height=16><font color="#0000ff" align=center>作者</font></td>
<td width=75% height=16><font size=3><b><%=writer%></b></font></td>
</tr>
<tr>
<td width=15% height=16><font color="#0000ff" align=center>发表时间</font></td>
<td width=75% height=16><b><%=liuyiantime%></b></td>
</tr>
<tr>
<td width=15% height=30><font color="#0000ff" align=center>内容</font></td>
<td width=75% height=30><font size=3><%=liuyiancontent%></font></td>
</tr>
</table>
</div>
<form name="form2" method="post" action="addliuyian.asp" onsubmit="return check();">
<hr align=center>
<center><h3><font color=red >我要留言</font></h3></center>
<center> 标题
<input type="text" name="liuyiantitle" size="50" value=""></center>
<p>
内容
<center>
<textarea name=liuyiancontent rows=6 cols=50>请在这里输入你要的发表的内容,最多不要超过180个字,而且你的发言将会被大家看到。</textarea>
<input type=hidden name=username value=<%=username%> >
<p><input type="submit" name="Submit" value="发表留言">
<input type=reset name="reset1" value=重新填写></center>
</form>
<script language=javascript >
<!--
function check()
{
if (document.form2.liuyiantitle.value=="")
{
alert("标题不能为空");
document.form2.liuyiantitle.focus();
return false;
}
if (document.form2.liuyiancontent.value=="")
{
alert("内容不能为空");
document.form2.liuyiancontent.focus();
return false ;
}
return true;
}
-->
</script>
</body>
</html>
Top
3 楼lvjinyou(快乐的人)回复于 2003-06-02 19:07:11 得分 0
呵呵,看看sql语句!你要什么功能就有什么功能了!Top
4 楼webasp(学到老)回复于 2003-06-03 23:23:24 得分 0
你网上查找ASP下载,有很多可拱你调试的程序!
给你一个:
ftp://down:down@aspsky.net/9seekGB5.2.zipTop
5 楼xjy521(笑剑影)回复于 2003-06-12 20:53:13 得分 0
good good study
day day up
Top




