jTemplates 使用
标题 |
{#foreach $T as row}
{$T.row.Title}
{#/for}
// $.ajax({
//type:"get",
//url: "http://bzapi.honganjk.com/dish/items.action",
//
//dataType: "json",
//headers:{
//"code":$.cookie("code"),
//"token":$.cookie("token")
//},
//
//success: function(data){
// var dishselect1 = data.data
// $("#result4").setTemplateURL("template3");
//$("#result4").processTemplate(dishselect1);
//}
// });
//var data =
//[
// { ID: '1', Title: 'EF 4.3 发布了' },
// { ID: '2', Title: 'ASP.NET MVC 4 Beta 发布了' },
//];
$.ajax({
url:"js/111.json",
type: "get",
dataType: "json",
success: function (req) {
$('#result').setTemplateElement("templateContainer");
$('#result').processTemplate(data);
}
});
一键复制
编辑
Web IDE
原始数据
按行查看
历史