新微赢技术网
标题:
再一次求助 asp中 mod运用问题
[打印本页]
作者:
大师傅
时间:
2010-1-10 23:51
标题:
再一次求助 asp中 mod运用问题
asp中 mod运用问题
这是一个广告显示,我想做成三行 每行4个图片 下面我弄得有些错误 请高手帮助改正一下 谢谢!!
Rs.Open Sql , Conn , 1 , 1
If Rs.Eof Then
Ind_01 = ""
Ind_01 = Ind_01 & "<table align=""center"" width=""730"" border=""0"" cellpadding=""0"" cellspacing=""0"">"
For i = 1 To 3
Ind_01 = Ind_01 & "<tr>"
For j = 1 To 4 Ind_01 = Ind_01 & "<td width=""180"" height=""60"" valign=""top""><img src=""Images/Ad_Ind_02_def.jpg"" width=""155"" height=""50"" border=""0"" /></td>"
Next
Ind_01 = Ind_01 & "</tr>"
Next
Ind_01 = Ind_01 & "</table>"
Else
Ind_01 = ""
Ind_01 = Ind_01 & "<table align=""center"" width=""730"" border=""0"" cellpadding=""0"" cellspacing=""0"">"
Ind_01 = Ind_01 & "<tr>"
i = 0
Do While Not Rs.Eof
Ind_01 = Ind_01 & "<td width=""180"" height=""60"" valign=""top"">"
If Rs("AdType") = "1" Then
Ind_01 = Ind_01 & "<object classid=""clsid27CDB6E-AE6D-11cf-96B8-444553540000"" codebase=""http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"" width=""155"" height=""50"">"
Ind_01 = Ind_01 & "<param name=""movie"" value="""& Rs("AdPicUrl") &""" />"
Ind_01 = Ind_01 & "<param name=""quality"" value=""high"" />"
Ind_01 = Ind_01 & "<embed src="""& Rs("AdPicUrl") &""" quality=""high"" pluginspage=""http://www.macromedia.com/go/getflashplayer"" type=""application/x-shockwave-flash"" width=""155"" height=""50""></embed>"
Ind_01 = Ind_01 & "</object>"
Else
If Rs("AdUrl") <> "" And Rs("AdUrl") <> "http://" Then
Ind_01 = Ind_01 & "<a href="""& Rs("AdUrl") &""" target=""_blank""><img src="""& Rs("AdPicUrl") &""" width=""155"" height=""50"" border=""0"" /></a>"
Else
Ind_01 = Ind_01 & "<img src="""& Rs("AdPicUrl") &""" width=""155"" height=""50"" border=""0"" />"
End If
End If
Ind_01 = Ind_01 & "</td>"
Rs.MoveNext
i = i + 1
If i >= 12 Then Exit Do
If i Mod 4 = 0 And Not Rs.Eof Then Ind_01 = Ind_01 & "</tr><tr>"
If ((i\3) + 1 < 2 Or i Mod 3 > 0) And Rs.Eof Then
If i Mod 3 > 0 Then
For j = (i Mod 4) + 1 To 4
Ind_01 = Ind_01 & "<td width=""180"" height=""60"" valign=""top""><img src=""Images/Ad_Ind_02_def.jpg"" width=""155"" height=""50"" border=""0"" /></td>"
Next
End If
If (i\3) + 1 < 2 Then
For i = (i\3) + 3 To 4
Ind_01 = Ind_01 & "<tr>"
For j = 1 To 4 Ind_01 = Ind_01 & "<td width=""180"" height=""60"" valign=""top""><img src=""Images/Ad_Ind_02_def.jpg"" width=""155"" height=""50"" border=""0"" /></td>"
Next
Ind_01 = Ind_01 & "</tr>"
Next
请高手帮助解决一下!!谢谢!!主要是上面的蓝色部分,调用12个 每行4个 显示三行
附件中是文件
非常感谢!! 附件: 只有本站会员才能下载或查看附件,请您 登录 或 注册
作者:
「①冄12號
时间:
2010-1-10 23:51
已经解决 多谢各位的关注!
作者:
…═☆幻
时间:
2010-1-10 23:51
没有好心人帮忙修改一下吗??
欢迎光临 新微赢技术网 (http://bbs.weiying.cn/)
Powered by Discuz! X3.2