Display a JS table in HTML

Solved
jibouz12 -  
 jibouz12 -
Hello,

I would like to know how I can display a table that I generate in a JS loop on my site in HTML.
I can create the table in the script, it's a simple one-dimensional array (var tableau = [ ]) that my for loop generates using the tableau.push() function.
I would now like to be able to display it in HTML so that it is visible on my site (displaying each element successively on my page).
I'm not sure if I was clear enough ^^,
thank you for your help.

3 answers

  1. jordane45 Posted messages 30426 Registration date   Status Moderator Last intervention   4 830
     
    Hello
    You just need to loop through your array and take each element to put it on your page.
    Do you have any knowledge of JavaScript?
    Do you know the innerHTML function? Or append?
    How do you want to display them? In a list, in a table, or otherwise?
    What is the current structure of your page? Where do you want to make this display?

    As you can see, your question lacks crucial details that are necessary for its resolution..

    --
    Best regards,
    Jordane
    1