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.,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. 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个 显示三行