Показать сообщение отдельно
  #4 (permalink)  
Старый 17.08.2022, 20:36
Аспирант
Отправить личное сообщение для Olga27 Посмотреть профиль Найти все сообщения от Olga27
 
Регистрация: 10.06.2021
Сообщений: 49

Часть 3:
var lvl1_photo0 = document.createElement("ul");
  var L1_photo0 = document.createElement("li");
  
  var lvl1_photo0_big = document.createElement("ul");
  var L1_photo0_big = document.createElement("li");
  
  var lvl1_photo0_big_data = document.createElement("ul");
  var L1_photo0_big_status = document.createElement("li");
  
  var L1_photo0_big_width = document.createElement("li");
  
  var L1_photo0_big_height = document.createElement("li");
  
  var L1_photo0_big_url = document.createElement("li");
  
  var lvl1_photo1 = document.createElement("ul");
  var L1_photo1 = document.createElement("li");
  
  
  //SMALL
  var lvl1_photo0_small = document.createElement("ul");
  var L1_photo0_small = document.createElement("li");
  
 
  
  var lvl1_photo0_small_data = document.createElement("ul");
  
  var L1_photo0_small_status = document.createElement("li");
  
  var L1_photo0_small_width = document.createElement("li");
   
  var L1_photo0_small_height = document.createElement("li");
  
  var L1_photo0_small_url = document.createElement("li");
  
  
  ////////BIG - 1
  var lvl1_photo1_big = document.createElement("ul");
  var L1_photo1_big = document.createElement("li");
  
  var lvl1_photo1_big_data = document.createElement("ul");
  
  //Уровень 2 
  var level2 = document.createElement("ul");
  var data2 = document.createElement("li");
  
  //Уровень 3 
  var level3 = document.createElement("ul");
  var data3 = document.createElement("li");
  
  //Уровень 4 
  var level4 = document.createElement("ul");
  var data4 = document.createElement("li");
  
  //Уровень 5 
  var level5 = document.createElement("ul");
  var data5 = document.createElement("li");
  
  //Уровень 6 
  var level6 = document.createElement("ul");
  var data6 = document.createElement("li");
  
  //Уровень 7 
  var level7 = document.createElement("ul");
  var data7 = document.createElement("li");
  
  //Уровень 8 
  var level8 = document.createElement("ul");
  var data8 = document.createElement("li");
  
  //Уровень 9 
  var level9 = document.createElement("ul");
  var data9 = document.createElement("li");
  
  //Уровень 10 
  var level10 = document.createElement("ul");
  var data10 = document.createElement("li");
  cur_parent.appendChild(cur_element);
  
  //0
  data0.innerHTML = "[0]";
  level0.appendChild(data0);
  level0.appendChild(sub_level0);
  sub_level0.appendChild(title0);
  title0.innerHTML = "[title] "+posts[0].title;
  
  sub_level0.appendChild(status0);
  status0.innerHTML = "[status] "+posts[0].status;
  
  sub_level0.appendChild(text0);
  text0.innerHTML = "[text] "+posts[0].text;
  
  sub_level0.appendChild(desc0);
  desc0.innerHTML = "[Description] "+posts[0].Discription;
  
  sub_level0.appendChild(photo0);
  photo0.innerHTML = "[photo]";
  
  sub_level0.appendChild(lvl0_photo0);
  
  lvl0_photo0.appendChild(L0_photo0);
  L0_photo0.innerHTML = "[0]";
  //desc0.innerHTML = "[Description] "+posts[0].Discription;
  
  lvl0_photo0.appendChild(lvl0_photo0_big);
  lvl0_photo0_big.appendChild(L0_photo0_big);
  L0_photo0_big.innerHTML = "[big]";
  
  lvl0_photo0_big.appendChild(lvl0_photo0_big_data);
  // level -> 0 | photo -> 0 | big -> 0 | status
  lvl0_photo0_big_data.appendChild(L0_photo0_big_status);
  L0_photo0_big_status.innerHTML = "[status] "+posts[0].photo[0].big.status;
  
  
   lvl0_photo0_big_data.appendChild(L0_photo0_big_width);
  L0_photo0_big_width.innerHTML = "[width] "+posts[0].photo[0].big.width;
  
  lvl0_photo0_big_data.appendChild(L0_photo0_big_height);
  L0_photo0_big_height.innerHTML = "[height] "+posts[0].photo[0].big.height;
  
  lvl0_photo0_big_data.appendChild(L0_photo0_big_url);
  L0_photo0_big_url.innerHTML = "[url] "+posts[0].photo[0].big.url;
  
  
  lvl0_photo0.appendChild(lvl0_photo0_small);
  lvl0_photo0_small.appendChild(L0_photo0_small);
  L0_photo0_small.innerHTML = "[small]";
  
  lvl0_photo0_small.appendChild(lvl0_photo0_small_data);
  lvl0_photo0_small_data.appendChild(L0_photo0_small_status);
  L0_photo0_small_status.innerHTML = "[status] "+posts[0].photo[0].small.status;
  
  
  lvl0_photo0_small_data.appendChild(L0_photo0_small_width);
  L0_photo0_small_width.innerHTML = "[width] "+posts[0].photo[0].small.width;
  
  lvl0_photo0_small_data.appendChild(L0_photo0_small_height);
  L0_photo0_small_height.innerHTML = "[height] "+posts[0].photo[0].small.height;
  
  lvl0_photo0_small_data.appendChild(L0_photo0_small_url);
  L0_photo0_small_url.innerHTML = "[url] "+posts[0].photo[0].small.url;
  //var lvl0_photo0_small = document.createElement("ul");
 // var L0_photo0_small = document.createElement("li");
 
  sub_level0.appendChild(lvl0_photo1);
  
  lvl0_photo0.appendChild(L0_photo1);
  L0_photo1.innerHTML = "[1]";
  
  
  lvl0_photo1.appendChild(lvl0_photo1_big);
  lvl0_photo1_big.appendChild(L0_photo1_big);
  L0_photo1_big.innerHTML = "[big]";
  
  lvl0_photo1_big.appendChild(lvl0_photo1_big_data);
  
  lvl0_photo1_big_data.appendChild(L0_photo1_big_status);
  L0_photo1_big_status.innerHTML = "[status] "+posts[0].photo[1].big.status;
  
  
  lvl0_photo1_big_data.appendChild(L0_photo1_big_width);
  L0_photo1_big_width.innerHTML = "[width] "+posts[0].photo[1].big.width;
  
  lvl0_photo1_big_data.appendChild(L0_photo1_big_height);
  L0_photo1_big_height.innerHTML = "[height] "+posts[0].photo[1].big.height;
  
  lvl0_photo1_big_data.appendChild(L0_photo1_big_url);
  L0_photo1_big_url.innerHTML = "[url] "+posts[0].photo[1].big.url;
  
  //SMALL
  lvl0_photo1.appendChild(lvl0_photo1_small);
  lvl0_photo1_small.appendChild(L0_photo1_small);
  L0_photo1_small.innerHTML = "[small]";
  
  lvl0_photo1_small.appendChild(lvl0_photo1_small_data);
  lvl0_photo1_small_data.appendChild(L0_photo1_small_status);
  L0_photo1_small_status.innerHTML = "[status] "+posts[0].photo[1].small.status;
  
  
  lvl0_photo1_small_data.appendChild(L0_photo1_small_width);
  L0_photo1_small_width.innerHTML = "[width] "+posts[0].photo[1].small.width;
  
  lvl0_photo1_small_data.appendChild(L0_photo1_small_height);
  L0_photo1_small_height.innerHTML = "[height] "+posts[0].photo[1].small.height;
  
  lvl0_photo1_small_data.appendChild(L0_photo0_small_url);
  L0_photo1_small_url.innerHTML = "[url] "+posts[0].photo[1].small.url;
  
  
  
  //1
  data1.innerHTML = "[1]";
  level1.appendChild(data1);
  
  level1.appendChild(sub_level1);
  sub_level1.appendChild(title1);
  title1.innerHTML = "[title] "+posts[0].title;
  
  sub_level1.appendChild(status1);
  status1.innerHTML = "[status] "+posts[0].status;
  
  sub_level1.appendChild(text1);
  text1.innerHTML = "[text] "+posts[0].text;
  
  sub_level1.appendChild(desc1);
  desc1.innerHTML = "[Description] "+posts[0].Discription;
  
  sub_level1.appendChild(photo1);
  photo1.innerHTML = "[photo]";
  
  sub_level1.appendChild(lvl1_photo0);
  
  lvl1_photo0.appendChild(L1_photo0);
  
  L1_photo0.innerHTML = "[0]";
  
  lvl1_photo0.appendChild(lvl1_photo0_big);
  lvl1_photo0_big.appendChild(L1_photo0_big);
  L1_photo0_big.innerHTML = "[big]";
  
  lvl1_photo0_big.appendChild(lvl1_photo0_big_data);
  // level -> 0 | photo -> 0 | big -> 0 | status
  lvl1_photo0_big_data.appendChild(L1_photo0_big_status);
  L1_photo0_big_status.innerHTML = "[status] "+posts[1].photo[0].big.status;
  
  
   lvl1_photo0_big_data.appendChild(L1_photo0_big_width);
  L1_photo0_big_width.innerHTML = "[width] "+posts[1].photo[0].big.width;
  
  lvl1_photo0_big_data.appendChild(L1_photo0_big_height);
  L1_photo0_big_height.innerHTML = "[height] "+posts[1].photo[0].big.height;
  
  lvl1_photo0_big_data.appendChild(L1_photo0_big_url);
  L1_photo0_big_url.innerHTML = "[url] "+posts[1].photo[0].big.url;
  //small
  lvl1_photo0.appendChild(lvl1_photo0_small);
  lvl1_photo0_small.appendChild(L1_photo0_small);
  L1_photo0_small.innerHTML = "[small]";
  
  lvl1_photo0_small.appendChild(lvl1_photo0_small_data);
  lvl1_photo0_small_data.appendChild(L1_photo0_small_status);
  L1_photo0_small_status.innerHTML = "[status] "+posts[1].photo[0].small.status;
  
  
  lvl1_photo0_small_data.appendChild(L1_photo0_small_width);
  L1_photo0_small_width.innerHTML = "[width] "+posts[1].photo[0].small.width;
  
  lvl1_photo0_small_data.appendChild(L1_photo0_small_height);
  L1_photo0_small_height.innerHTML = "[height] "+posts[1].photo[0].small.height;
  
  lvl1_photo0_small_data.appendChild(L1_photo0_small_url);
  L1_photo0_small_url.innerHTML = "[url] "+posts[1].photo[0].small.url;

....
Ответить с цитированием