これが私のJson応答形式です:-
{"Value":[{"ID":"1","productID":"10","subsID":"9","MinPrice":"500","MaxPrice":"50000","Subs":"xyz100"}]}
これが私の.jsコードです:-
function productURL(url) {
alert(url);
$.ajax({
url: url,
type : "GET",
dataType : "json",
contentType: "application/json",
async : false,
success : function(msg) {
var respPrice = msg.Value;
$.each(respPrice, function(index, value) {
if(value.VarietyID == 0) {
alert('No product subs list found');
} else {
subsId = value.subsID;
substance = value.subs;
minPrice = value.MinPrice;
maxPrice = value.MaxPrice;
respPrice += '<li class="ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-last-child ui-btn-up-e">' + substance + minPrice + '-' + maxPrice + '</li>';
};
}
});
$('#productList').append(respPrice).listview('refresh');
},
error : function(e) {
console.log(e.message);
alert('Error Occoured');
}
});
}
listview を適切に生成するには、どのような変更を行う必要がありますか? どんな助けでも大いに感謝します。