<div id="xmb" >
<div id="xbt"><div class="xb"><img src="/images/host_jb.png" /><p><strong><a href="/1.html">电视1</a></strong><br />电视</p></div> <div class="xm"><img src="/images/3_05.jpg" /></div></div>
<div id="xnr">
<ul>
<li>电视1</li>
</ul>
<div class="xwz"><span class="font_price">90</span></div>
</div>
<div class="xan"><a href="asp_frm.asp?gid=100" class="buy_button">立刻订购</a><a href="/jiben/1.html" class="view_button">查看详情</a></div>
</div>
这个<div id="xmb" > 第三个商品后加上<div id="xmb" style="margin-right:0;">这个 应该怎以写!求大神帮我一下 谢谢
asp?循环输出
------解决方案--------------------
<%
idx=0
while not rs.eof
idx=idx+1
%>
<div id="xmb"<%if idx=3 then response.write " style=""margin-right:0;"""%>>
<div id="xbt"><div class="xb"><img src="/images/host_jb.png" /><p><strong><a href="/1.html">电视1</a></strong><br />电视</p></div> <div class="xm"><img src="/images/3_05.jpg" /></div></div>
<div id="xnr">
<ul>
<li>电视1</li>
</ul>
<div class="xwz"><span class="font_price">90</span></div>
</div>
<div class="xan"><a href="asp_frm.asp?gid=100" class="buy_button">立刻订购</a><a href="/jiben/1.html" class="view_button">查看详情</a></div>
</div>
<%wend%>