【发布时间】:2011-05-11 21:54:36
【问题描述】:
我正在使用 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)answer1、2)answer2、3)answer3
或
a)answer1, b)answer2, c)answer3
我该怎么办?
【问题讨论】: