1
是否可以在模板中創建局部變量或for循環(而不是foreach)?我想給HTML元素提供唯一的id,需要一個計數器或其他東西。謝謝!j模板中的局部變量/ for循環
是否可以在模板中創建局部變量或for循環(而不是foreach)?我想給HTML元素提供唯一的id,需要一個計數器或其他東西。謝謝!j模板中的局部變量/ for循環
使用$index
$index - index of the element in the table
$iteration - ID of the iteration (the next number begins from 0)
$first - is this the first iteration?
$last - is this the last iteration?
$total - the total number of iterations
前
{#foreach $T.Rows as row}
$T.row$index
{#/for}
閱讀http://www.codeproject.com/Articles/45759/jQuery-jTemplates-Grid
prefectly合作。非常感謝你! – tempid 2012-04-23 18:06:22