当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: 打开自己写的程序的窗体时,出现提示"运行错误"401",模式窗体显示时不能显示非模式窗体".请告诉我是怎么回事? ......
    摘要: 由clistview得到的clistctrl如何响应鼠标事件? clistctrl没有id,不能用on_notify(nm_click, idc_list1, onclicklist),怎么解决?望大虾指点 ......


自动换行的问题

 
  以下的代码应该是当内容在一排内到了两个就自动换行吧?  
  为什么我的第一排内老是有三个呢?  
  后面的都是两个一行!  
  <table   border=1   cellpadding=2   width="100%">  
                                      <tr>     <%  
  count=0  
  do   while   not   (zhuinew.eof   or   zhuinew.bof)   and   count<zhuinew.PageSize  
  %>     <td>    
                                                   内容</td><%if   count>=2   and   count   mod   2=0   then%>   </tr><tr><%end   if%>  
          <%zhuinew.movenext  
  count=count+1  
  loop  
  end   if%>  
                                          <%zhuinew.close  
  set   zhuinew=nothing  
  %>     </tr>     </table>  
 

NO.1   作者: angelheavens

给个例子给你看(我刚才写的)  
  <table   border="1"><tr>  
  <%  
  perpagesize=20   每页显示记录数  
  n=3   每行显示数据记录数  
  for   i=1   to   perpagesize  
      if   (i   mod   n)<>0   then  
              response.write   "<td>"&i&"</td>"  
      else  
            response.write   "<td>"&i&"</td></tr>"  
      end   if  
  next  
  %>  
  </table>  
 

NO.2   作者: ttt2

<table   border=1   cellpadding=2   width="100%">  
                                      <tr>     <%  
  count=0  
  while   not   (zhuinew.eof   or   zhuinew.bof)   and   count<zhuinew.PageSize  
  %>     <td>    
                                                   内容</td><%if   count>=2   and   count   mod   2=0   then%>   </tr><tr><%end   if%>  
          <%  
  count=count+1  
   
  zhuinew.movenext  
  wend%>  
                                          <%zhuinew.close  
  set   zhuinew=nothing  
  %>     </tr>     </table>  
   
 

NO.3   作者: net_lover

<%count=0%>  
  <table   border=1   cellpadding=2   width="100%">  
  <%  
  while   not   (zhuinew.eof)   and   count<zhuinew.PageSize  
  if   count   mod   3=0   then   response.write   "<tr>"  
  %><td>内容</td>  
  <%  
  zhuinew.movenext  
  count=count+1  
  if   count   mod   3=0   then   response.write   "</tr>"  
  wend  
  zhuinew.close  
  set   zhuinew=nothing  
  %>  
  </table>  
   
  我写了一个智能的n栏分的代码,上班给你发来


 ·居然灌水灌出四个角开心    »显示摘要«
    摘要: 真是没想到!:) ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE