联系官方销售客服
1835022288
028-61286886
如何循环input标签给input标签里面的index一个数?比如循环出四个input标签时,那么index里面的值为(第一个index="0";第二个index="1";第三个index="2";第四个index="3")
<div class="mkcf_con">
<form id="kaoshi" method="post">
{if $dxldcdnr}
{list action=module module=danxuanti IN_id=$dxldcdnr}
<div class="mkcf_single" >
<p class="mksg_tt">
{$key+1}.{$t.title}
</p>
<div class="mksg_ans" >
{php $fenzhi =dr_string2array($t.fenzhi);}
{loop $fenzhi $t}
<label>
<input type="radio" name="dan{$key+1}" value="{$t.value} " index="" class="sg_radio"/>
<span class="sg_num"></span>
</label>
{/loop}
</div>
</div>
</div>
{/list}
{/if}
</div>