我想把下面代码中的第一个
部份显示4行第行二列.用JAVASCRIPT如何写代码呀?

shigangyuan 2005-07-19 01:34:56
<!--#include file="Connections/Productconn.asp" -->
<%
var rexc__MMColParam = "1";
if (String(Request.QueryString("类别ID")) != "undefined" &&
String(Request.QueryString("类别ID")) != "") {
rexc__MMColParam = String(Request.QueryString("类别ID"));
}
%>
<link href="style.css" rel="stylesheet" type="text/css">
<%
var rexc = Server.CreateObject("ADODB.Recordset");
rexc.ActiveConnection = MM_Productconn_STRING;
rexc.Source = "SELECT * FROM Products WHERE 类别ID = "+ rexc__MMColParam.replace(/'/g, "''") + " ORDER BY 目录ID DESC";
rexc.CursorType = 0;
rexc.CursorLocation = 2;
rexc.LockType = 1;
rexc.Open();
var rexc_numRows = 0;
%>
<table width="260" height="130" border="0" cellpadding="0" cellspacing="0" class="bgimages">
<tr>
<th scope="col"><table width="260" height="130" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<th height="26" colspan="3" valign="top"><!--DWLayoutEmptyCell--> </th>
<th width="143" valign="top" scope="col"><!--DWLayoutEmptyCell--> </th>
</tr>
<tr>
<th width="10" rowspan="2" valign="top"><!--DWLayoutEmptyCell--> </th>
<th width="96" rowspan="2" align="center" valign="middle" nowrap><img src="<%=(rexc.Fields.Item("小图片地址").Value)%>" width="78" height="76"></th>
<th width="11" rowspan="2" valign="top"><!--DWLayoutEmptyCell--> </th>
<th height="44" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="143" height="44" align="left" valign="top" class="showproduct" style="word-break:break-all"><%=(rexc.Fields.Item("名称").Value)%><br>
<br>
免税品销售价: US$ <%=(rexc.Fields.Item("价格").Value)%></td>
</tr>
</table></th>
</tr>
<tr>
<th valign="middle"><img src="images/cpjs.gif" width="100" height="23"></th>
</tr>
<tr>
<th height="25" colspan="3" valign="top"> </th>
<th valign="top" scope="col"> </th>
</tr>
</table></th>
</tr>
</table>
<%
rexc.Close();
%>
---------------------------------------------------------------------------------------
我想把上面代码中的第一个<table>部份显示4行第行二列.用JAVASCRIPT如何写代码呀?
...全文
200 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
shigangyuan 2005-07-19
  • 打赏
  • 举报
回复
up
shigangyuan 2005-07-19
  • 打赏
  • 举报
回复
不行呀,可不可在详细一些
shigangyuan 2005-07-19
  • 打赏
  • 举报
回复
谢谢上面二仁兄
wanghui0380 2005-07-19
  • 打赏
  • 举报
回复
例子:
<table width="260" height="130" border="0" cellpadding="0" cellspacing="0" class="bgimages" id=mytable>
<script>
alert(document.all.mytable.rows(4).cells(2).innerText)
</script>


jackycxg 2005-07-19
  • 打赏
  • 举报
回复
我想把上面代码中的第一个<table>部份显示4行第行二列 这句话什么意思?听都听不懂

如果是说想让“第一个<table>部份显示4行每行显示二列”的话,用javascript我不会写,只知道在asp里直接加个参数就好了,具体我就不写,大概这样
<table>
<%
rs.open...打开记录
if not rs.eof then
i=0
do while not rs.eof
if i mod 2=0 then response.write "<tr>"
显示内容。。。
rs.movenext
i=i+1
if i mod 2=0 then response.write </tr>"
loop
end if
中间部分自己去补充吧

shigangyuan 2005-07-19
  • 打赏
  • 举报
回复
我想把上面代码中的第一个<table>部份显示4行每行二列.用JAVASCRIPT如何写代码呀?
shigangyuan 2005-07-19
  • 打赏
  • 举报
回复
我想把上面代码中的第一个<table>部份显示4行每行二列.用JAVASCRIPT如何写代码呀?
shigangyuan 2005-07-19
  • 打赏
  • 举报
回复
帮助呀

28,406

社区成员

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

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