【发布时间】:2012-01-21 03:23:39
【问题描述】:
我正在为模板使用 jQuerys “tmpl”插件。现在我有一个数组,其中的元素也是数组,我必须访问特定的元素。
即数组将是:
var arr = {
'id':23422,
'title':'example',
'images': {'small':'34fge.jpg','original':'dfsdf354.jpg'}
};
现在在寺庙里我想访问 arr[images][small] 但它不起作用。我正在尝试的是:
<div>
<h3>${title}</h3>
<img src="${arr}{images}{small}" />
</div>
任何人有任何帮助/想法吗?
【问题讨论】:
标签: jquery templates jquery-plugins jquery-templates