CSV to HTML translation: Difference between revisions
Content added Content deleted
(updating js example) |
(updating js example) |
||
Line 1,362: | Line 1,362: | ||
=={{header|JavaScript}}== |
=={{header|JavaScript}}== |
||
<lang JavaScript> |
<lang JavaScript>var csv = "Character,Speech\n" + |
||
var csv = "Character,Speech\n" + |
|||
"The multitude,The messiah! Show us the messiah!\n" + |
"The multitude,The messiah! Show us the messiah!\n" + |
||
"Brians mother,<angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry>\n" + |
"Brians mother,<angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry>\n" + |
||
Line 1,392: | Line 1,391: | ||
} |
} |
||
console.log('<table><thead>\n' + thead + '</thead><tbody>\n' + rows + '</tbody></table>' ); |
console.log('<table><thead>\n' + thead + '</thead><tbody>\n' + rows + '</tbody></table>' );</lang> |
||
</lang> |
|||
<lang |
<lang html5><table><thead> |
||
<table><thead> |
|||
<tr><th>Character</th><th>Speech</th></tr> |
<tr><th>Character</th><th>Speech</th></tr> |
||
</thead><tbody> |
</thead><tbody> |
||
Line 1,404: | Line 1,401: | ||
<tr><td>Brians mother</td><td>I'm his mother; that's who!</td></tr> |
<tr><td>Brians mother</td><td>I'm his mother; that's who!</td></tr> |
||
<tr><td>The multitude</td><td>Behold his mother! Behold his mother!</td></tr> |
<tr><td>The multitude</td><td>Behold his mother! Behold his mother!</td></tr> |
||
</tbody></table> |
</tbody></table></lang> |
||
</lang> |
|||
=={{header|Lua}}== |
=={{header|Lua}}== |