CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Web 开发 >  非技术区

高分求动态网页,最简单的那种只要一个加一个查询功能。

楼主globalwabg(global)2003-06-02 10:51:32 在 Web 开发 / 非技术区 提问

要求一定要建一个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&"','"&timestr&"')"  
            myconn.execute(mysql)  
            myconn.close  
            response.write   "<p>&nbsp;</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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
  &nbsp;&nbsp;内容  
  <center>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
              <textarea   name=liuyiancontent   rows=6   cols=50>请在这里输入你要的发表的内容,最多不要超过180个字,而且你的发言将会被大家看到。</textarea>  
          <input   type=hidden   name=username   value=<%=username%>   >  
          <p><input   type="submit"   name="Submit"   value="发表留言">&nbsp;&nbsp;&nbsp;&nbsp;  
          <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

相关问题

  • 一个动态的简单查询语句 like,谢谢
  • 请教一个简单的动态查询问题
  • 动态查询
  • 动态查询
  • 动态查询
  • 这段简单的动态创建的查询代码有什么问题??
  • iBATIS动态查询
  • 动态网页问题
  • .net 动态生成网页
  • 简单问题:打开网页时动态加入表格,我这样为什么不行?先谢了!

关键词

得分解答快速导航

  • 帖主:globalwabg

相关链接

  • Web开发类图书

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo