Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <!-- Q04-P1 -->
- <html>
- <head>
- <meta charset="utf-8">
- <title>Tabela de Multiplicação</title>
- <style type="text/css">
- #titulo {
- text-align: center;
- background-color: gray;
- }
- tr {
- text-align: center;
- }
- </style>
- </head>
- <body>
- <table border="1">
- <caption></caption>
- <thead>
- <tr>
- <td id="titulo" colspan="2">Produto de 7</td>
- </tr>
- </thead>
- <script type="text/javascript">
- for(var i = 1; i <= 10; i++) {
- var x = (Math.floor(((Math.random() * 10) +1)));
- document.writeln("<tr>");
- document.writeln("<td> "+i+" x "+x+"</td>");
- document.writeln("<td>"+i*x+"</td>");
- document.writeln("</tr>");
- }
- </script>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement