图片分行分列显示问题,asp代码
各位大侠,请帮忙看看下面这段代码怎么修改,我想让图片以四行三列显示subArticleContent(intTitleLen)dimi,strTempi=0dowhile...
各位大侠,请帮忙看看下面这段代码怎么修改,我想让图片以四行三列显示
sub ArticleContent(intTitleLen)
dim i,strTemp
i=0
do while not rsArticle.eof
strTemp=""
strTemp= strTemp & " <table class='top_m_txt01' width=100% border=0 cellspacing=3 cellpadding=0>"
strTemp= strTemp & " <tr>"
strTemp= strTemp & " <td width=40% rowspan=7>"
strTemp= strTemp & " <div align=center> <a href=ProductShow.asp?ArticleID=" & rsArticle("articleid") & ">"
fileExt=lcase(getFileExtName(rsArticle("DefaultPicUrl")))
if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then
strTemp= strTemp & " <img border=1 src=" & rsArticle("DefaultPicUrl") & " width=170 height=120>"
else
if fileext="swf" then
strTemp= strTemp & " <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='105' height='84'>"
strTemp= strTemp &" <param name=movie value='"&rsArticle("DefaultPicUrl")&"'>"
strTemp= strTemp &" <param name=quality value=high>"
strTemp= strTemp &" <param name='Play' value='-1'>"
strTemp= strTemp &" <param name='Loop' value='0'>"
strTemp= strTemp &" <param name='Menu' value='-1'>"
strTemp= strTemp &" <param name='wmode' value='transparent'>"
strTemp= strTemp &" <embed src='"&rsArticle("DefaultPicUrl")&"' width='105' height='84' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'> </embed> </object>"
end if
end if
strTemp= strTemp & " </tr>"
strTemp= strTemp & " <td colspan=2>"
strTemp= strTemp & " <table width=100% border=0 cellpadding=0 cellspacing=0>"
strTemp= strTemp & " </a> </div>"
strTemp= strTemp & " </table>"
strTemp= strTemp & " </td>"
strTemp= strTemp & " </table>"
response.write strTemp
rsArticle.movenext
i=i+1
if i>=MaxPerPage then exit do
loop
end sub
本人对ASP不懂,希望大侠们可以把怎么改的,改哪里写出来,多谢多谢 展开
sub ArticleContent(intTitleLen)
dim i,strTemp
i=0
do while not rsArticle.eof
strTemp=""
strTemp= strTemp & " <table class='top_m_txt01' width=100% border=0 cellspacing=3 cellpadding=0>"
strTemp= strTemp & " <tr>"
strTemp= strTemp & " <td width=40% rowspan=7>"
strTemp= strTemp & " <div align=center> <a href=ProductShow.asp?ArticleID=" & rsArticle("articleid") & ">"
fileExt=lcase(getFileExtName(rsArticle("DefaultPicUrl")))
if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then
strTemp= strTemp & " <img border=1 src=" & rsArticle("DefaultPicUrl") & " width=170 height=120>"
else
if fileext="swf" then
strTemp= strTemp & " <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='105' height='84'>"
strTemp= strTemp &" <param name=movie value='"&rsArticle("DefaultPicUrl")&"'>"
strTemp= strTemp &" <param name=quality value=high>"
strTemp= strTemp &" <param name='Play' value='-1'>"
strTemp= strTemp &" <param name='Loop' value='0'>"
strTemp= strTemp &" <param name='Menu' value='-1'>"
strTemp= strTemp &" <param name='wmode' value='transparent'>"
strTemp= strTemp &" <embed src='"&rsArticle("DefaultPicUrl")&"' width='105' height='84' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'> </embed> </object>"
end if
end if
strTemp= strTemp & " </tr>"
strTemp= strTemp & " <td colspan=2>"
strTemp= strTemp & " <table width=100% border=0 cellpadding=0 cellspacing=0>"
strTemp= strTemp & " </a> </div>"
strTemp= strTemp & " </table>"
strTemp= strTemp & " </td>"
strTemp= strTemp & " </table>"
response.write strTemp
rsArticle.movenext
i=i+1
if i>=MaxPerPage then exit do
loop
end sub
本人对ASP不懂,希望大侠们可以把怎么改的,改哪里写出来,多谢多谢 展开
展开全部
sub ArticleContent(intTitleLen)
dim i,strTemp
strTemp= strTemp & " <table class='top_m_txt01' width=100% border=0 cellspacing=3 cellpadding=0>"
i=0
do while not rsArticle.eof
strTemp=""
strTemp= strTemp & " <tr>"
for j=1 to 3
if not rsArticle.eof then
strTemp= strTemp & " <td width=40%>"
strTemp= strTemp & " <div align=center> <a href=ProductShow.asp?ArticleID=" & rsArticle("articleid") & ">"
fileExt=lcase(getFileExtName(rsArticle("DefaultPicUrl")))
if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then
strTemp= strTemp & " <img border=1 src=" & rsArticle("DefaultPicUrl") & " width=170 height=120>"
else
if fileext="swf" then
strTemp= strTemp & " <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='105' height='84'>"
strTemp= strTemp &" <param name=movie value='"&rsArticle("DefaultPicUrl")&"'>"
strTemp= strTemp &" <param name=quality value=high>"
strTemp= strTemp &" <param name='Play' value='-1'>"
strTemp= strTemp &" <param name='Loop' value='0'>"
strTemp= strTemp &" <param name='Menu' value='-1'>"
strTemp= strTemp &" <param name='wmode' value='transparent'>"
strTemp= strTemp &" <embed src='"&rsArticle("DefaultPicUrl")&"' width='105' height='84' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'> </embed> </object>"
end if
end if
strTemp= strTemp & " </a> </div>"
strTemp= strTemp & " </td>"
rsArticle.movenext
else
strTemp= strTemp & " <td width=40% >"
strTemp= strTemp & " "
strTemp= strTemp & " <td width=40% >"
end if
next
strTemp= strTemp & " </tr>"
strTemp= strTemp & " </table>"
response.write strTemp
rsArticle.movenext
i=i+1
if i>=MaxPerPage or i>3 then exit do
loop
end sub
收ASP徒弟,学费200,有需要的联系百度HI
dim i,strTemp
strTemp= strTemp & " <table class='top_m_txt01' width=100% border=0 cellspacing=3 cellpadding=0>"
i=0
do while not rsArticle.eof
strTemp=""
strTemp= strTemp & " <tr>"
for j=1 to 3
if not rsArticle.eof then
strTemp= strTemp & " <td width=40%>"
strTemp= strTemp & " <div align=center> <a href=ProductShow.asp?ArticleID=" & rsArticle("articleid") & ">"
fileExt=lcase(getFileExtName(rsArticle("DefaultPicUrl")))
if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then
strTemp= strTemp & " <img border=1 src=" & rsArticle("DefaultPicUrl") & " width=170 height=120>"
else
if fileext="swf" then
strTemp= strTemp & " <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='105' height='84'>"
strTemp= strTemp &" <param name=movie value='"&rsArticle("DefaultPicUrl")&"'>"
strTemp= strTemp &" <param name=quality value=high>"
strTemp= strTemp &" <param name='Play' value='-1'>"
strTemp= strTemp &" <param name='Loop' value='0'>"
strTemp= strTemp &" <param name='Menu' value='-1'>"
strTemp= strTemp &" <param name='wmode' value='transparent'>"
strTemp= strTemp &" <embed src='"&rsArticle("DefaultPicUrl")&"' width='105' height='84' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'> </embed> </object>"
end if
end if
strTemp= strTemp & " </a> </div>"
strTemp= strTemp & " </td>"
rsArticle.movenext
else
strTemp= strTemp & " <td width=40% >"
strTemp= strTemp & " "
strTemp= strTemp & " <td width=40% >"
end if
next
strTemp= strTemp & " </tr>"
strTemp= strTemp & " </table>"
response.write strTemp
rsArticle.movenext
i=i+1
if i>=MaxPerPage or i>3 then exit do
loop
end sub
收ASP徒弟,学费200,有需要的联系百度HI
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询