标题:全乱了求图片的效果
只看楼主
wangjy500
Rank: 11Rank: 11Rank: 11Rank: 11
等 级:贵宾
威 望:13
帖 子:457
专家分:2569
注 册:2010-7-11
得分:0 
把loop改成next

QQ:63572063
2010-12-01 18:09
kevinxu0638
Rank: 2
来 自:江苏
等 级:论坛游民
帖 子:147
专家分:62
注 册:2009-10-19
得分:0 
回复 21楼 wangjy500
错误类型:
Microsoft VBScript 编译器错误 (0x800A041F)
错误的 'Next'
/sssss/files/Untitled-2.asp, line 87
next

javascript、asp学习研究中 希望高手多多指教
2010-12-01 18:11
wangjy500
Rank: 11Rank: 11Rank: 11Rank: 11
等 级:贵宾
威 望:13
帖 子:457
专家分:2569
注 册:2010-7-11
得分:0 
没道理的啊。把你改好的找码放上来看看,

QQ:63572063
2010-12-01 18:28
kevinxu0638
Rank: 2
来 自:江苏
等 级:论坛游民
帖 子:147
专家分:62
注 册:2009-10-19
得分:0 
回复 23楼 wangjy500
<%  
    Dim X_typestr
    X_typestr=Request.QueryString("typestr")
Dim db,strSql,rs
    Set db=Server.CreateObject("ADODB.Connection")
    db.Open "Dsn=background"                           
    Set rs=Server.CreateObject("ADODB.Recordset")
    strSql="Select * From news where typestr ='鲁菜'order by id desc"
    rs.Open strSql,db,1
    %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.
<HTML xmlns="http://www.
<HEAD><TITLE>菜单!</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<style type="text/css">
<!--
.wang500 {
    width: 508px;
    margin: 0px;
    padding: 0px;
    border-top-width: 1px;
    border-right-width: 1px;
    border-bottom-width: 1px;
    border-left-width: 1px;
    border-top-style: none;
    border-right-style: solid;
    border-bottom-style: solid;
    border-left-style: solid;
    border-top-color:  #1f92ff;
    border-right-color:  #1f92ff;
    border-bottom-color:  #1f92ff;
    border-left-color:  #1f92ff;
}
.wang500 div {
    float: left;
    height: 25px;
    width: 148px;
    margin-left: 15px;
    line-height: 25px;
}-->
</style>
</HEAD>
<BODY>
<table cellspacing="0" cellpadding="0" width="510"  background="../images/tu_di.gif" border="0">
      <tr>
        <td width="7"><img height="29" src="../images/tu(1).gif" width="7" /></td>
        <td ><font color="#ffffff"><b>列表</b></font></span></td>
        <td width="7"><img height="29" src="../images/tu1.gif" width="7" /></td>
      </tr>
    </table>
    <%
Rs.PageSize = 4
If Request("PageNo") = "" Then PageNo=1 Else PageNo = CInt(Request("PageNo"))
If PageNo < 1 Then Response.Redirect "?PageNo=1"
If PageNo > Rs.PageCount And Rs.PageCount > 0 Then Response.Redirect "?PageNo=" & Rs.PageCount
If Rs.Eof and Rs.Bof Then PageNo = 0 Else Rs.AbsOlutePage = PageNo
%>
<div class="wang500">
<%For x = 1 to Rs.PageSize
If Rs.Eof Then Exit For
%>
<div><li><%
    if  not rs.eof then
     if len(rs("title")) > 8  then
      if (InStr(rs("memo"),"<img")>0) or (InStr(rs("memo"),"<IMG")>0) then
        %><a href="zw.asp?id=<%=rs("id")%>" target="_blank"><%
         response.Write left(rs("title"),5)&" ..." %></a>&nbsp;<img src="../images/pic.gif" width="12" height="12"><%
         else
         %><a href="zw.asp?id=<%=rs("id")%>" target="_blank"><%
         response.Write left(rs("title"),5)&" ..."%></a><%
         end if
      else
          if (InStr(rs("memo"),"<img")>0) or (InStr(rs("memo"),"<IMG")>0)  then
          %><a href="zw.asp?id=<%=rs("id")%>" target="_blank"><%
         response.write rs("title")%></a>&nbsp;<img src="../images/pic.gif" width="12" height="12"><%
         else
          %><a href="zw.asp?id=<%=rs("id")%>" target="_blank"><%
            response.write rs("title")%></a><%
            end if
      end if
      end if     
    %></li></div>
    <%rs.movenext
next%>
<table cellspacing="0" width="508" border="0" >

                <tr><td>&nbsp;</td></tr>   
              <tr>
                <td align="center">
            总[<span class="style1">
            <% = Rs.RecordCount%>
            </span>]条<strong>|</strong> <span class="style1">
            <% = Rs.PageSize%>
            </span>条<strong>/</strong>页 <strong>|</strong> 当前<span class="style1">
            <% = PageNo%>
            </span><strong>/</strong><span class="style1">
            <% = Rs.PageCount%>
            </span>页 <a href="Untitled-2.asp?PageNo=<% =Rs.AbsOlutePage%>">首页</a> <a href="Untitled-2.asp?PageNo=<% = PageNo - 1%>">上一页</a> <a href="Untitled-2.asp?PageNo=<% = PageNo + 1%>">下一页</a> <a href="Untitled-2.asp?PageNo=<% =Rs.PageCount%>">尾页</a>
            <!--分页代码结束-->
</td>
              </tr>
            </table>
 
</div>


</BODY></HTML>
麻烦指点

javascript、asp学习研究中 希望高手多多指教
2010-12-01 21:12
wangjy500
Rank: 11Rank: 11Rank: 11Rank: 11
等 级:贵宾
威 望:13
帖 子:457
专家分:2569
注 册:2010-7-11
得分:0 
if  not rs.eof then
     if len(rs("title")) > 8  then
      if (InStr(rs("memo"),"<img")>0) or (InStr(rs("memo"),"<IMG")>0) then
        %><a href="zw.asp?id=<%=rs("id")%>" target="_blank"><%
         response.Write left(rs("title"),5)&" ..." %></a>&nbsp;<img src="../images/pic.gif" width="12" height="12"><%
         else
         %><a href="zw.asp?id=<%=rs("id")%>" target="_blank"><%
         response.Write left(rs("title"),5)&" ..."%></a><%
         end if
      else
          if (InStr(rs("memo"),"<img")>0) or (InStr(rs("memo"),"<IMG")>0)  then
          %><a href="zw.asp?id=<%=rs("id")%>" target="_blank"><%
         response.write rs("title")%></a>&nbsp;<img src="../images/pic.gif" width="12" height="12"><%
         else
          %><a href="zw.asp?id=<%=rs("id")%>" target="_blank"><%
            response.write rs("title")%></a><%
            end if
      end if
      end if
把这段换成 response.write rs("title")看循环有没有错!

QQ:63572063
2010-12-02 13:06
kevinxu0638
Rank: 2
来 自:江苏
等 级:论坛游民
帖 子:147
专家分:62
注 册:2009-10-19
得分:0 
回复 25楼 wangjy500
这样没了 但是我要那段是片段文章有没有图片和控制标题长度的啊 这个你知道的吧

javascript、asp学习研究中 希望高手多多指教
2010-12-02 13:25
kevinxu0638
Rank: 2
来 自:江苏
等 级:论坛游民
帖 子:147
专家分:62
注 册:2009-10-19
得分:0 
回复 25楼 wangjy500
谢谢你wangjy500 搞定了 原来里面多了个    if  not rs.eof then ,else忘写了 谢谢

javascript、asp学习研究中 希望高手多多指教
2010-12-02 13:29



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-327405-1-1.html




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

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