我試圖在解析中做到這一點。所以我想獲得url形象:試圖打印一個Javascript對象內部的url
var Encharcamientos1 = Parse.Object.extend("Report");
var query = new Parse.Query(Inundaciones1);
query.equalTo("Tipo_Reporte", "Encharcamientos");
query.find({
success: function(results) {
// Do something with the returned Parse.Object values
for (var i = 0; i < results.length; i++) {
var object = results[i];
if(object.get("ImageFile") !== '' && typeof object.get("ImageFile") !== 'undefined' || object.get("ImageFile") == true) {
var file = object.get("ImageFile");
console.log(file);
var liga = file.url;
document.getElementById(".imagen").innerHTML = liga;
}
控制檯日誌把我這個,我需要的URL,那麼,如何可以打印網址,以顯示圖像? (舉例):
b.File {_name: "tfss-b59f1559-1ac4-4b49-8191-f167a95b7e69-Ruben-Espinosa-1.jpg", _url: "http://files.parsetfss.com/9ab97f5c-e03d-4602-a7be…-1ac4-4b49-8191-f167a95b7e69-Ruben-Espinosa-1.jpg"}
感謝
什麼是西甲??? – sbaglieri
我把變量liga放在代碼上。我忘了說,但它不起作用 –