【发布时间】:2017-07-27 00:57:40
【问题描述】:
我正在拼命想办法制作这张桌子......
我有 3 个字段需要在同一个 <td> 中,另一个字段本身需要在 <td> 中
我已使用以下代码成功地将带有 JSON 的数据获取到我的页面:
$.ajax({
url: 'code.php',
async: false,
dataType: 'json',
success: function (json) {
window.upc = json.upc;
window.img_name = json.img_name;
window.quantity = json.quantity;
window.description = json.description;
}
});
我怎样才能让这些数据按照我的意愿进行格式化?
|文字|图片|
|TEXT|去|
|TEXT|这里|
【问题讨论】:
-
我不认为它是重复的,他的数据结构不同,并且可能会像该问题的答案所暗示的那样使用 jqGrid。
-
@Devin:看看 jquery.templ,它是一个可靠的插件(是的,它只是测试版,但它很好)。 api.jquery.com/tmpl.
标签: javascript jquery json html-table