首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

这个循环如何写啊等!

2012-01-19 
这个循环怎么写啊?急等!!tablewidth 209 border 0 cellspacing 0 cellpadding 0 trtdhei

这个循环怎么写啊?急等!!
<table   width= "209 "   border= "0 "   cellspacing= "0 "   cellpadding= "0 ">
                        <tr>
                            <td   height= "31 "   align= "left "   background= "image/left_title1.jpg "> <span   class= "fontsize16 "> 精品展示 </span> </td>
                        </tr>
                        <tr>
                            <td   height= "157 "   background= "image/lxfs_content.jpg "> <SCRIPT   type=text/javascript>
<!--
var   focus_width=206
var   focus_height=172
var   text_height=20
var   swf_height   =   focus_height+text_height
var   pics=new   Array();
var   links=new   Array();
var   texts=new   Array();
<%
set   rs=server.createobject( "adodb.recordset ")
sqltext= "select   *   from   teacher   Order   BY   id   desc "
rs.open   sqltext,conn,1,1
dim   PerPage66
PerPage66=15
%>
<%
if   not   rs.eof   then
i=1
do   while   not   rs.eof
%>
pics= 'image/image1.jpg|image/image2.jpg|image/image3.jpg ';
links= 'cpzs_view.html|cpzs_view.html|cpzs_view.html ';
texts= '新闻1|新闻2|新闻3 ';
<%
i=i+1
if   i   >   PerPage66   then   exit   do
rs.movenext
loop
end   if
%>
document.write( ' <object   ID= "focus_flash "   classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 "   codebase= "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 "   width= " '+   focus_width   + ' "   height= " '+   swf_height   + ' "> ');
document.write( ' <param   name= "allowScriptAccess "   value= "sameDomain "> <param   name= "movie "   value= "image/pic_new.swf "> <param   name= "quality "   value= "high "> <param   name= "bgcolor "   value= "#E5E5EB "> ');
document.write( ' <param   name= "menu "   value= "false "> <param   name=wmode   value= "opaque "> ');
document.write( ' <param   name= "FlashVars "   value= "pics= '+pics+ '&links= '+links+ '&texts= '+texts+ '&borderwidth= '+focus_width+ '&borderheight= '+focus_height+ '&textheight= '+text_height+ ' "> ');
document.write( ' <embed   ID= "focus_flash "   src= "image/pic_new.swf "   wmode= "opaque "   FlashVars= "pics= '+pics+ '&links= '+links+ '&texts= '+texts+ '&borderwidth= '+focus_width+ '&borderheight= '+focus_height+ '&textheight= '+text_height+ ' "   menu= "false "     quality= "high "   width= " '+   focus_width   + ' "   height= " '+   swf_height   + ' "   allowScriptAccess= "sameDomain "   type= "application/x-shockwave-flash "   pluginspage= "http://www.macromedia.com/go/getflashplayer "   /> ');


document.write( ' </object> ');
//-->
</SCRIPT> </td>
                        </tr>
                    </table>


我现在不知道该怎么从数据库中循环取出数据放到这个里面
pics= 'image/image1.jpg|image/image2.jpg|image/image3.jpg ';
links= 'cpzs_view.html|cpzs_view.html|cpzs_view.html ';
texts= '新闻1|新闻2|新闻3 ';

[解决办法]

if not rs.eof then
i=1
do while not rs.eof
%>
if pics <> ' '
pics=pics+ "| "+rs( "pics_url ")
else
pics=rs( "pics_url ")

不知是不是这个意思
[解决办法]
if not rs.eof then
i=1
do while not rs.eof
%>
if pics <> ' '
pics=pics+ "| "+rs( "pics_url ")
else
pics=rs( "pics_url ")
[解决办法]
do while not rs.eof
%>
pics= " ' " + pics + rs.field(n),value + " ' ";
links== " ' " + links+ rs.field(n),value + " ' ";
texts== " ' " + texts+ rs.field(n),value + " ' ";
<%
i=i+1
if i > PerPage66 then exit do
rs.movenext
loop


应该就是在你说的位置写一个字符串组织语句,不知道行不行,可以自己试下

热点排行