0
如何從JS對象訪問值以更改它在for循環中?迭代JS對象元素並修改它們
var dataForModal = {gpsID: response.id, lastUpdated: response.lastUpdate};
$.each(dataForModal, function (index, value) {
if(value === undefined) {
//this will ofcourse just change the value of the local var value
value="<i class='mNotAvailable'>not available</i>";
}
});
只使用'dataForModal'。其關閉。 –
'dataForModal'屬性 – d4rty