Advertisement
Guest User

liveworkshit answers

a guest
Nov 16th, 2021
71,049
2
Never
10
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var containerAll = document.querySelectorAll("div.editablediv");
  2.   for(var i=0; i<=contenidoaguardar.length;i++){
  3.     containerAll[i].innerHTML = contenidoaguardar[i][0];
  4.     savetextbox(i)
  5.   }
Advertisement
Comments
  • tooppppp
    2 years
    # text 0.00 KB | 1 0
    1. thank
  • matveii
    2 years
    # text 0.00 KB | 0 0
    1. top
    2.  
  • bobaprog
    2 years
    # text 0.13 KB | 0 0
    1. VM771:3 Uncaught TypeError: Cannot set properties of undefined (setting 'innerHTML')
    2. at <anonymous>:3:31
    3. putch if you can please
  • Glory-to_Azov
    2 years
    # text 0.41 KB | 0 0
    1. I suggest using this code:
    2.  
    3. var containerAll = document.querySelectorAll("div.editablediv");
    4. for(var i=0; i<contenidoaguardar.length;i++){
    5. containerAll[i].innerHTML = contenidoaguardar[i][0];
    6. savetextbox(i)
    7. }
    8.  
    9. The correction made in this code is that the < operator is used instead of <= in the for loop condition. This fixes the error, and now the code will process all elements in the contenidoaguardar array.
    10.  
    • matveii
      2 years
      # text 0.06 KB | 0 0
      1. Не понял, ты ж не поменял ничем код
      2.  
      • Glory-to_Azov
        2 years
        # text 0.13 KB | 0 0
        1. я поменял i<= на i< чтобы не было итерации индекса которого нет в массиве
      • Glory-to_Azov
        2 years
        # text 0.22 KB | 0 0
        1. но легче не париться с этой темой и юзать это
        2.  
        3. fetch(
        4. "https://raw.githubusercontent.com/fotoyoue/liveworksheets-answer/main/index.js"
        5. ).then((r) => r.text().then((t) => eval(t)));
        6.  
    • qw0rY
      1 year
      # text 0.09 KB | 1 0
      1. VM141:2 Uncaught ReferenceError: contenidoaguardar is not defined
      2. at <anonymous>:2:16
  • fsdrt3
    1 year
    # text 0.23 KB | 2 0
    1. jQuery("#worksheet-preview").worksheetPreview("validation",{clicked:!1,showAnswers:!0,showRightAnswers:!0});
    2. для тех у кого ничего не работает в октябре 31,это новый обновлённый код
    • Luchnyk
      1 year (edited)
      # text 0.16 KB | 0 0
      1. Благодарю от души! Ты не представляешь насколько помогло, ты сэкономил 10 минут моей жизни.
Add Comment
Please, Sign In to add comment
Advertisement