急求,取值每次都相同!!

mysite365 2008-05-05 02:17:13

<tbody>

<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "Select * FROM bout_mboard Order By dateandtime Desc"
rs.open sql,conn,1,1
if not rs.bof and not rs.eof then
IF not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Then
page=1
Else
Page=Int(Abs(Request("page")))
End if
rs.pagesize = mypagesize
total= rs.RecordCount
rs.absolutepage = page
end if
dim i
i=1
do while not rs.eof and mypagesize>0
id=rs("gbookid")
name=rs("name")
email=rs("email")
homepage=rs("homepage")
oicq=rs("oicq")
head=rs("head")
content=rs("content")
content=Autolink(content)
dateandtime=rs("dateandtime")
reply=rs("reply")
sex=rs("sex")
%>

<tr>
<td bgcolor="<%=rs9("bgss")%>" rowspan=2 width=80>
<center>
<% if rs9("textonly")=0 then %><img border=0 src="<%=head%>"> <br><% end if %>
<br>
<%=name%>
</center>
</td>
<td bgcolor="<%=rs9("bgss")%>" height=20>
<table border=0 cellpadding=0 cellspacing=0 width="99%">
<tbody>
<tr>
<td valign=bottom width="50%"><font class=cha2> 发表于:<%=dateandtime%></font>
<input type="hidden" id="<%=id%>" value="<%=id%>"/> </td>
<td align=right width="50%"><img align=absBottom alt=<%=name%>来自<%=rs("come")%> border=0
height=16 src="images/icon_profile.gif" width=16> <a
<% if right(email,1)<>"!" then %> href="mailto:<%=email%>" <% end if %> title="<%=name%>的邮件地址是:<%=email%>"><img align=absBottom
border=0 height=16 src="images/icon_email.gif" width=16></a> <a
title="<%=name%>的QQ号是:<%=oicq%>"><img align=absBottom
border=0 height=16 src="images/icon_editor_oicq.gif" width=16></a>
<a
<% if right(homepage,1)<>"!" then %> href="<%=homepage%>" <% end if %> target=_blank title="<%=name%>的主页地址是:<%=homepage%>"><img
align=absBottom border=0 height=16 src="images/icon_homepage.gif"
width=16></a> <img align=absBottom alt=<%=name%>的IP地址是:<%=rs("ip")%>
height=16 src="images/icon_ip.gif" width=16>
<% if session("admin")<>"" then %>
<a href="#" onClick="reply()" title="只有版主才有回复的权限"><img align=absBottom src="images/icon_reply_topic.gif" width="16" height="16" border="0"></a>
<script language="javascript">
function reply()
{
var bookid=document.getElementById("<%=id%>").value;
[color=#808000]alert(bookid)
var str="reply.asp?gbookid="+bookid;
var temp="dialogWidth=400px;dialogHeight=220px;status=no;help=no;scrollbars=no"
window.showModalDialog(str,"",temp);
}
</script>[/color] <a href="del.asp?gbookid=<%=id%>" title="只有版主才有删除留言的权限"><img align=absBottom src="images/icon_delete_reply.gif" width="16" height="16" border="0"></a>
<% end if %>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td bgcolor="<%=rs9("bgsrc")%>" height=80 align="left">
<table border=0 cellpadding=0 cellspacing=2 width="100%">
<tbody>
<tr>
<td><%=content%></td>
</tr>
<tr>
<td>
<%if reply<>"没有" then%>
<br>
<hr size=1>
<font color="#000000">版主回复:</font><font color=#B08291><%=reply%></font>
<%end if%>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<%
i=i+1
rs.movenext
loop
%>
<tr>
<td bgcolor="<%=rs9("bgs")%>" colspan=2 height=18 valign=bottom >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" height="22">
当前 <%=page%>/<%=rs.pagecount%>页  共<b><%=total%></b>条留言  
<%if page<>1 then%>
<a href="admin_staff.asp?page=1" >第一页</a> <a href="admin_staff.asp?page=<%=(page-1)%>">上一页</a>
<% end if
if page<>rs.pagecount then %>
<a href="admin_staff.asp?page=<%=(page+1)%>">下一页</a>
<a href="admin_staff.asp?page=<%=rs.pagecount%>">最后一页</a> 页次  
<% end if
rs.close
set rs=nothing %>
</td>
</tr>
</table>
</td>
</tr>

</tbody>
</table>



就是红色得,地方每次alert得到值都相同~~高手帮看看
...全文
90 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
mysite365 2008-05-06
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 chinmo 的回复:]
你是指当前页的内容一样?还是页之间
[/Quote]

大哥看看2楼把。。。。。。。。。
  • 打赏
  • 举报
回复
你是指当前页的内容一样?还是页之间
mysite365 2008-05-05
  • 打赏
  • 举报
回复
谁来看看啊~~~~~~
mysite365 2008-05-05
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 jhwcd 的回复:]
4搂说的对!!!
引用 4 楼 xck01 的回复:
说不定你rs("gbookid") 取出的每个值都是一样的呢?,选把,
rs("gbookid") 在循环中的值打出来看看吧,就知道了
[/Quote]

我得循环每问题得,试验证实,rs("gbookid") 也输出不同得值。就是3楼红色,JS得到得值每次都相同,应该是JS得问题,大家看看JS把。。
jhwcd 2008-05-05
  • 打赏
  • 举报
回复
4搂说的对!!!
[Quote=引用 4 楼 xck01 的回复:]
说不定你rs("gbookid") 取出的每个值都是一样的呢?,选把,
rs("gbookid") 在循环中的值打出来看看吧,就知道了
[/Quote]
xck01 2008-05-05
  • 打赏
  • 举报
回复
说不定你rs("gbookid") 取出的每个值都是一样的呢?,选把,
rs("gbookid") 在循环中的值打出来看看吧,就知道了
pjm168268 2008-05-05
  • 打赏
  • 举报
回复
大哥,哪里才是你所指的红色的地方哦,这么多红色的
mysite365 2008-05-05
  • 打赏
  • 举报
回复
<script language="javascript">
function reply()
{
var bookid=document.getElementById(" <%=id%>").value;
alert(bookid);
var str="reply.asp?gbookid="+bookid;
var temp="dialogWidth=400px;dialogHeight=220px;status=no;help=no;scrollbars=no"
window.showModalDialog(str,"",temp);
}
</script>


主要是这里,每次得到得BOOKID都相同。。。。。。。。。。。。。
mysite365 2008-05-05
  • 打赏
  • 举报
回复
<tbody>

<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "Select * FROM bout_mboard Order By dateandtime Desc"
rs.open sql,conn,1,1
if not rs.bof and not rs.eof then
IF not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Then
page=1
Else
Page=Int(Abs(Request("page")))
End if
rs.pagesize = mypagesize
total= rs.RecordCount
rs.absolutepage = page
end if
dim i
i=1
do while not rs.eof and mypagesize>0
id=rs("gbookid")
name=rs("name")
email=rs("email")
homepage=rs("homepage")
oicq=rs("oicq")
head=rs("head")
content=rs("content")
content=Autolink(content)
dateandtime=rs("dateandtime")
reply=rs("reply")
sex=rs("sex")
%>

<tr>
<td bgcolor="<%=rs9("bgss")%>" rowspan=2 width=80>
<center>
<% if rs9("textonly")=0 then %><img border=0 src="<%=head%>"> <br><% end if %>
<br>
<%=name%>
</center>
</td>
<td bgcolor="<%=rs9("bgss")%>" height=20>
<table border=0 cellpadding=0 cellspacing=0 width="99%">
<tbody>
<tr>
<td valign=bottom width="50%"><font class=cha2> 发表于:<%=dateandtime%></font>
<input type="hidden" id="<%=id%>" value="<%=id%>"/> </td>
<td align=right width="50%"><img align=absBottom alt=<%=name%>来自<%=rs("come")%> border=0
height=16 src="images/icon_profile.gif" width=16> <a
<% if right(email,1)<>"!" then %> href="mailto:<%=email%>" <% end if %> title="<%=name%>的邮件地址是:<%=email%>"><img align=absBottom
border=0 height=16 src="images/icon_email.gif" width=16></a> <a
title="<%=name%>的QQ号是:<%=oicq%>"><img align=absBottom
border=0 height=16 src="images/icon_editor_oicq.gif" width=16></a>
<a
<% if right(homepage,1)<>"!" then %> href="<%=homepage%>" <% end if %> target=_blank title="<%=name%>的主页地址是:<%=homepage%>"><img
align=absBottom border=0 height=16 src="images/icon_homepage.gif"
width=16></a> <img align=absBottom alt=<%=name%>的IP地址是:<%=rs("ip")%>
height=16 src="images/icon_ip.gif" width=16>
<% if session("admin")<>"" then %>
<a href="#" onClick="reply()" title="只有版主才有回复的权限"><img align=absBottom src="images/icon_reply_topic.gif" width="16" height="16" border="0"></a>
<script language="javascript">
function reply()
{
var bookid=document.getElementById("<%=id%>").value;
[color=#808000]alert(bookid)
var str="reply.asp?gbookid="+bookid;
var temp="dialogWidth=400px;dialogHeight=220px;status=no;help=no;scrollbars=no"
window.showModalDialog(str,"",temp);
}
</script>[/color] <a href="del.asp?gbookid=<%=id%>" title="只有版主才有删除留言的权限"><img align=absBottom src="images/icon_delete_reply.gif" width="16" height="16" border="0"></a>
<% end if %>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td bgcolor="<%=rs9("bgsrc")%>" height=80 align="left">
<table border=0 cellpadding=0 cellspacing=2 width="100%">
<tbody>
<tr>
<td><%=content%></td>
</tr>
<tr>
<td>
<%if reply<>"没有" then%>
<br>
<hr size=1>
<font color="#000000">版主回复:</font><font color=#B08291><%=reply%></font>
<%end if%>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<%
i=i+1
rs.movenext
loop
%>
<tr>
<td bgcolor="<%=rs9("bgs")%>" colspan=2 height=18 valign=bottom >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" height="22">
当前 <%=page%>/<%=rs.pagecount%>页  共<b><%=total%></b>条留言  
<%if page<>1 then%>
<a href="admin_staff.asp?page=1" >第一页</a> <a href="admin_staff.asp?page=<%=(page-1)%>">上一页</a>
<% end if
if page<>rs.pagecount then %>
<a href="admin_staff.asp?page=<%=(page+1)%>">下一页</a>
<a href="admin_staff.asp?page=<%=rs.pagecount%>">最后一页</a> 页次  
<% end if
rs.close
set rs=nothing %>
</td>
</tr>
</table>
</td>
</tr>

</tbody>
</table>

就是红色得,地方每次alert得到值都相同~~高手帮看看,修改了~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~·

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧