Salut,
Je veux créer un tableau dans un iframe html. Initialement mon tableau est de type JSON. D'habitude je fait une balise table dans le code html comme celle la:
Mais pour mon cas je dois faire une boucle sur mon tableau JSON, récupérer les donner et les insérer dans la balise HTML. Mon tableau JSON:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 TABLE border="1" cellpadding="5" cellspacing="2"> <TR> <TH colspan="5" scope="colgroup">' + jsonData.title + '</TH> </TR> <TR> <TH scope="col" abbr="header">' + jsonData.header. + '</TH> <TH scope="col" abbr="title">' + jsonData.header. + '</TH> <TH scope="col">' + jsonData.header. + '</TH> <TH scope="col">' + jsonData.header. + '</TH> </TR> </TABLE>
Merci d'avance.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 "title":"reportTile", "header":{ { "header title": "header_1" }, { "header title": "header_2" }, { "header title": "header_3" }
Partager