| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 317 人关注过本帖
标题:请高手帮我看下下面这个代码
只看楼主 加入收藏
gudaohaha
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2008-5-9
收藏
 问题点数:0 回复次数:0 
请高手帮我看下下面这个代码
<!--#include file="conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>娱乐新闻</title>
<style type="text/css">
<!--
table {
    font-size: 9pt;
    text-decoration: none;
    
}
a {    font-size: 9pt;    color: #000000;    text-decoration: none;}
body {    background-color: #ffffff;}
.STYLE11 {font-size: 12px}
.STYLE13 {font-size: 12px; color: #0000FF; }
.style34 {color: #3399FF}
-->
</style>


</head>

<body>
<%   'Dim  CurPage,PERPAGE
   'If Request("page") = "" Then
        'CurPage = 1
   'If Page < 1 Then
        'curPage = 1
    
    'Else
        'CurPage = CInt(Request("page"))
    'End If
    
    %>
    
<%
    '分页显示评论内容
    'Dim i
    '设置每页记录数
    'rs.PageSize = PERPAGE

    '设置当前页码
    'rs.AbsolutePage = CurPage

    '循环显示每一项
    'For i = 1 To rs.PageSize
    
%>
<table width="980" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <!--DWLayoutTable-->
  <tr>
    <td width="75" height="30">&nbsp;</td>
    <td width="830">&nbsp;</td>
    <td width="75">&nbsp;</td>
  </tr>
  <tr>
    <td height="1140">&nbsp;</td>
    <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <!--DWLayoutTable-->
        <tr>
          <td height="136" colspan="2" valign="top"><!--#include file="head.asp"-->&nbsp;</td>
        </tr>
        <tr>
          <td width="631" height="1004" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <!--DWLayoutTable-->
              <tr>
                <td height="24" colspan="2" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.,0,0,0" width="79" height="22">
                          <param name="movie" value="text43.swf">
                          <param name="quality" value="high">
                          <embed src="text43.swf" quality="high" pluginspage="http://www. type="application/x-shockwave-flash" width="79" height="22" ></embed>
                        </object>
                        </span>                        
                        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.,0,0,0" width="84" height="18">
                          <param name="movie" value="text41.swf">
                          <param name="quality" value="high">
                          <param name="bgcolor" value="#FFFFFF">
                          <embed src="text41.swf" quality="high" pluginspage="http://www. type="application/x-shockwave-flash" width="84" height="18" bgcolor="#FFFFFF"></embed>
                        </object>
                          
                          <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.,0,0,0" width="19" height="18">
                            <param name="movie" value="text44.swf">
                            <param name="quality" value="high">
                            <embed src="text44.swf" quality="high" pluginspage="http://www. type="application/x-shockwave-flash" width="19" height="18" ></embed>
                          </object>
                        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.,0,0,0" width="73" height="22">
                          <param name="movie" value="text56.swf">
                          <param name="quality" value="high">
                          <param name="bgcolor" value="#FFFFFF">
                          <embed src="text56.swf" quality="high" pluginspage="http://www. type="application/x-shockwave-flash" width="73" height="22" bgcolor="#FFFFFF"></embed>
                          </object>                        
                &nbsp;</td>
              </tr>
              <tr>
                <td height="24" colspan="2" valign="top"><img src="images/anniu,gif.gif">
                  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.,0,0,0" width="81" height="24">
                    <param name="movie" value="text57.swf">
                    <param name="quality" value="high">
                    <param name="bgcolor" value="#FFFFFF">
                    <embed src="text57.swf" quality="high" pluginspage="http://www. type="application/x-shockwave-flash" width="81" height="24" bgcolor="#FFFFFF"></embed>
                  </object></td>
              </tr>
              <tr>
                <td width="199" height="957" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                  <!--DWLayoutTable-->
                  <tr>
                    <td width="35" height="14">&nbsp;</td>
                    <td width="115">&nbsp;</td>
                    <td width="49">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="115">&nbsp;</td>
                    <td valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="21">&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="115">&nbsp;</td>
                    <td valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="692">&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                </table></td>
                <p><td width="432" valign="top" class="style34">            
                <%
    
    'Dim CurPage,PERPAGE

    '每页10条评论记录
    'PERPAGE = 20

    '读取页码参数page,如果page为空,则为第一页
    'If Request("page") = "" Then
        'CurPage = 1
    'Else
        'CurPage = CInt(Request("page"))
    'End If
%>   
      <%
            Dim i,rs
            PERPAGE = 20
            Set rs = Server.CreateObject("ADODB.RecordSet")
            sql="select * from News,Category where news.CateID=Category.CID and '娱乐新闻' order by NewsID desc"
            rs.cursortype=3
            rs.open sql,conn
            on error resume next
            If rs.EOF Then
               '则关闭记录集
               rs.Close
               '显示目前还没有评论
               Response.Write "此类别暂时还没有新闻,请添加!!!"
           Else
              '设置每页记录数
             rs.PageSize = PERPAGE
             if request("page")<>"" then
                curpage=cint(request("page"))
                if curpage<1 then curpage=1
                if curpage>rs.pagecount then curpage=rs.pagecount
            else
               curpage=1
            end if
            '设置当前页码
            rs.AbsolutePage = CurPage
            For i = 1 To rs.PageSize   
                Response.Write "<a class='style34' onClick='return newwin(this.href);' href='newsView.asp?id=" + cstr(rs("newsid")) + "'>" + rs("newsTitle") +"</p>"
                rs.movenext
                '这里缺少对最后一条数据的判断
                if rs.eof then exit for
            next
            end if
                        %>   
            
            <br><br>
            <p align="center">

<a href="indexgn.asp?page=1">首页</a>
<%IF Curpage<>1 Then%>
  <a href="indexgn.asp?page=<%=curpage-1%>">上一页</a>
<%Else%>
  前一页
<%End IF%>
<%IF CurPage<>rs.pagecount Then%>
<a href="indexgn.asp?page=<%=curpage+1%>">下一页</a>
<%Else%>
  后一页
<%End IF%>
<a href="indexgn.asp?page=<%=rs.pagecount%>">末页</a>
</p>
<p align="center">第<%=curpage%>页/总<%=rs.pagecount%>页</p>

<%
  rs.close
%>

       &nbsp;</p>
</td>
              </tr>
          </table></td>
          <td width="199" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
        </tr>
    </table></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="30">&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>






为题描述:我运行的时候页面就是空白的,什么东西都没有,但是他也没提示什么错误啊,谢谢了
搜索更多相关主题的帖子: 代码 
2008-05-17 20:08
快速回复:请高手帮我看下下面这个代码
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.083882 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved