<!--购物车模板 开始-->
<script type='text/html' id='cartTemplete'>
<dl class="cartlist">
<%for(var item in goodsData){%>
<%var data = goodsData[item]%>
<dd id="site_cart_dd_<%=item%>">
<div class="pic f_l"><img width="55" height="55" src="{webroot:<%=data['img']%>}"></div>
<h3 class="title f_l"><a href="{url:/site/products/id/<%=data['goods_id']%>}"><%=data['name']%></a></h3>
<div class="price f_r t_r">
<b class="block">¥<%=data['sell_price']%> x <%=data['count']%></b>
<input class="del" type="button" value="删除" onclick="removeCart('{url:/simple/removeCart}','<%=data['id']%>','<%=data['type']%>');$('#site_cart_dd_<%=item%>').hide('slow');" />
</div>
</dd>
<%}%>
<dd class="static"><span>共<b name="mycart_count"><%=goodsCount%></b>件商品</span>金额总计:<b name="mycart_sum">¥<%=goodsSum%></b></dd>
<%if(goodsData){%>
<dd class="static">
{if:ISafe::get('user_id')}
<a class="f_l" href="javascript:void(0)" onclick="deposit_ajax('{url:/simple/deposit_cart_set}');">寄存购物车>></a>
{/if}
<label class="btn_orange"><input type="button" value="去购物车结算" onclick="window.location.href='https://www.yiichina.com/question/{url:/simple/cart}';" /></label>
</dd>
<%}%>
</dl>
</script>
<!--购物车模板 结束-->
请问里面的script下面可以加“dl”标签吗?
还有就是<%for(var item in goodsData){%>
是什么意思?
问题呢??
for语句应该是循环输出购物车里的商品信息。