ExtJS-使用JSON数据的XTemplate,将某些值显示为链接

错误123456789

以下是我使用JSON数据的tpl。我只是想检查“ Key”是否==“ something”,并显示相应的“ Value”作为链接。

谢谢

this.tpl = new Ext.XTemplate(
  '<div class="blah" style="padding-bottom:3px;float:left;">Details</div>',
    '<hr style="clear:left;"/>',
      '<tpl for=".">',
         '<span class="blah"><b>{Key}:</b> {Value}</span>',
        '</tpl>',
      '</div>',
      '<br>'
    );
XuYishen
'<span class="blah"><b>{Key}:</b>',
     '<tpl if="Key==\'something\'"><p><a herf="#">{Value}</a></tpl>',
     '<tpl if="Key!=\'something\'"><p>{Value}</tpl>',
 '</span>',

在extjs3.3中测试

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章