Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- </head>
- <body>
- <table id='a'>
- </table>
- <script type='text/javascript'>
- var table = document.getElementById('a');
- var tr = document.createElement('tr');
- var td;
- for (var index = 0; index < 10; index++) {
- td = document.createElement('td');
- td.appendChild(document.createTextNode(index));
- tr.appendChild(td);
- }
- //tr.innerHTML = '<td>hola</td>';
- table.appendChild(tr);
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment