你好,我有JSON格式的結果,我想將它追加到HTML div。 JSON的樣子:追加Json到div
jsonp1373893536648([{
"MAXCHILDREN": 1,
"PICTURE": "3AE30747-0956-0F6C-F6F4D6FC13243BDF.jpg",
"MAXPERSONS": 3,
"RATEINCLUDE": 2,
}, {
"MAXCHILDREN": 1,
"PICTURE": "3AF1F0ED-01DC-32C8-C663F39A1B430F89.jpg",
"MAXPERSONS": 3,
"RATEINCLUDE": 2,
}, {
"MAXCHILDREN": 3,
"PICTURE": "3AF6A412-CB40-3B77-C777273F5378345A.jpg",
"MAXPERSONS": 3,
"RATEINCLUDE": 2,
}, {
"MAXCHILDREN": 1,
"PICTURE": "3AFC9046-92F4-DBB7-93E5D7EF8A9AB831.jpg",
"MAXPERSONS": 3,
"RATEINCLUDE": 2,
}])
現在我需要例如做這樣的事情:
jQuery(response_container).append('<div class="maxchildren">MAXCHILDREN: ' + MAXCHILDREN + '</div>');
jQuery(response_container).append('<div class="pic">PICTURE: ' + PICTURE+ '</div>'); ...
每個MAXCHILDREN,圖片,MAXPERSONS,RATEINCLUDE。 請任何幫助?
謝謝2人它也是很好的方法。 – pey22