我有个例子,不过是用ASP做的
<table width="100%" border="0" cellpadding="3" cellspacing="0" class="Ntable" >
                    <%
   if not rs.eof then
     rs.absolutepage=pageno '将指针移至指定页的第一条记录   
     loopno=pmcount   
     temp1 = 1
     do while not rs.eof and loopno>0  
     Product = rs("Product")
     Price = rs("Price")
     
 
 select case temp1
     case 1 temp1 = temp1+1
%>
                    <tr> 
                      <td width="35%" valign="top" ><img src="images/icon3.gif" width="12" height="11">&nbsp;</td>
                      <td width="10%"><span class="font12"><font color="#FF0000">¥</font></span>:</td>
                      <td width="10%">&nbsp;</td>
                      <%
case 2 temp1 = temp1-1
%>
                      <td width="35%"><img src="images/icon3.gif" width="12" height="11">&nbsp;</td>
                      <td width="10%"><span class="font12"><font color="#FF0000">¥</font></span>:</td>
                    </tr>
                    <%
  end select
  rs.movenext   
  loopno=loopno-1   
  loop
  if temp1 = 2 then
%>
                    <td width="35%">&nbsp;&nbsp;</td>
                    <td width="10%">&nbsp;</td>
                    </tr>
                    <%
  end if
else
%>
                    <%
  end if
  rs.close   
  conn.close
  set conn=nothing
  set rs=Nothing 
%>
                  </table>