我正在使用 jQuery 模板插件,但不知道如何获取项目的索引:http: //api.jquery.com/category/plugins/templates/
这是我的代码:
<script id="optionTmpl" type="text/x-jquery-tmpl">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
{{each Answers}}
<tr>
<th><input type="radio" name="group1" value="${this.AnswerID}" /></th>
<td>${this.AnswerText}</td><!-- add number in this line--->
</tr>
{{/each}}
</table>
</script>
我想以如下格式显示答案
1)答案1, 2)答案2, 3)答案3
或者
a) 答案 1,b) 答案 2,c) 答案 3
我该怎么办?