top.frames["anotherFrame"].document.all.youwantogiveelement.value = id 上面这行怎么加?请看详细代码 <% Sub LastNextPage(pagecount,page,resultcount) //分页代码(略) End Sub %> <!--#include file="conn.asp" --> //(数据连接代码略) <% sql="select * from book" set rs = server.createobject("adodb.recordset") rs.open sql,conn,1,1 if not rs.eof then rs.PageSize =10 '每页记录条数 page_num=rs.PageSize'每页记录条数 result_num=rs.RecordCount '记录总数maxpage=rs.PageCount page=request("page")if Not IsNumeric(page) or page="" then page=1 else page=cint(page) end ifif page<1 then page=1 elseif page>maxpage then page=maxpage end ifrs.AbsolutePage=Pageelse result_num=0 maxpage=0 page=0 end if %><script language="javascript" SRC="click.js"></script> //(这个文件在上面已经贴出来了) <script> function openbag(id) { window.open("view.asp?id="+id,"","height=155,width=530,left=130,top=120,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");} </script><table width="100%" style="BORDER-COLLAPSE: collapse"> <tr class="a1"> <td>id</td> <td>name</td> <td>time</td> </tr> <% if not rs.eof then for i=1 to rs.PageSize %> <tr class="a5" id="Row<%=i-1%>" onclick="javascript:setRowFocus(this,false,<%=i-1%>)" ondblclick="javascript:openbag('<%=rs("id")%>')" title="双击查看详细内容"> <td><%=rs("id")%></td> <td><%=rs("name")%></td> <td><%=rs("time")%></td> </tr> <% rs.movenext:if rs.EOF then Exit For next end if %> <script LANGUAGE="javascript"> <!-- setRowFocus(Row0,true,0) ; //--> </script> </table> <% call LastNextPage(maxpage,page,result_num) %>
照你说的加上去提示top.frames["anotherFrame"]缺少对象或方法
top.frames["anotherFrame"].document.all.youwantogiveelement.value = id anotherFrame 想要传值的哪个侦 youwantogiveelement 你的表单元素的名字,按照这个改了嘛?
上面这行怎么加?请看详细代码
<%
Sub LastNextPage(pagecount,page,resultcount)
//分页代码(略)
End Sub
%>
<!--#include file="conn.asp" -->
//(数据连接代码略)
<%
sql="select * from book"
set rs = server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof then
rs.PageSize =10 '每页记录条数
page_num=rs.PageSize'每页记录条数
result_num=rs.RecordCount '记录总数maxpage=rs.PageCount
page=request("page")if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end ifif page<1 then
page=1
elseif page>maxpage then
page=maxpage
end ifrs.AbsolutePage=Pageelse
result_num=0
maxpage=0
page=0
end if
%><script language="javascript" SRC="click.js"></script>
//(这个文件在上面已经贴出来了)
<script>
function openbag(id) { window.open("view.asp?id="+id,"","height=155,width=530,left=130,top=120,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");}
</script><table width="100%" style="BORDER-COLLAPSE: collapse">
<tr class="a1">
<td>id</td>
<td>name</td>
<td>time</td>
</tr> <% if not rs.eof then
for i=1 to rs.PageSize %>
<tr class="a5" id="Row<%=i-1%>" onclick="javascript:setRowFocus(this,false,<%=i-1%>)" ondblclick="javascript:openbag('<%=rs("id")%>')" title="双击查看详细内容">
<td><%=rs("id")%></td>
<td><%=rs("name")%></td>
<td><%=rs("time")%></td>
</tr> <%
rs.movenext:if rs.EOF then Exit For
next
end if
%>
<script LANGUAGE="javascript">
<!--
setRowFocus(Row0,true,0) ;
//-->
</script>
</table>
<% call LastNextPage(maxpage,page,result_num) %>
anotherFrame 想要传值的哪个侦
youwantogiveelement 你的表单元素的名字,按照这个改了嘛?