javascript - How to display JSON single level menu -
i have json file link images specific folder this
["http://img1.png","http://img2.png","http://img3.png","http://img4.png"]
and want create <ul>
list don't know how. can me small example?
thanks
using json can connect http://shared1.ad-lister.co.uk/getimageslist.aspx?contextid=c9d56aca-506c-40be-9068-037d0fba62c9&folder=_design/car-marques
$.post("http://shared1.ad-lister.co.uk/getimageslist.aspx?contextid=c9d56aca-506c-40be-9068-037d0fba62c9&folder=_design/car-marques", function (json) { var html = '<ul>'; (var = 0; < json.length; i++) { html += '<li><img src="'+json[i]+'" /></li>'; } html += '</ul>'; $('.contents').html(html); });
Comments
Post a Comment