图片如下:
我是这样写的,但是不美观,有好的办法吗???
Dim Rs,SQl,strp,strc
strp=""
strc=""
Set Rs= Server.CreateObject("adodb.recordset")
SQL="Select username,province,city from [Dv_User] where city<>"""" and province<>"""" Order by province asc,city asc,username asc "
rs.open sql,conn,1,1
response.write("<table border=1 cellspacing=1 cellpadding=1>")
while not rs.eof
if strp<>rs("province") then
response.write("<tr><td>"&rs("province")&"</td>")
else
response.write("<td></td>")
end if
if strc<>rs("city") then
response.write("<td>"&rs("city")&"</td><td>")
response.write(rs("username")&"</td></tr>")
else
response.write("<td></td><td>")
response.write(rs("username")&"</td></tr>")
end if
strp=rs("province")
strc=rs("city")
rs.movenext
wend
Rs.close
Set Rs=Nothing
response.write("</table>")
效果图如下,可不可以帮助美化一下: