Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!Doctype html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>Tabliczka 2</title>
- <script>
- function tablica(){
- var liczba=parseInt(form1.f1.value);
- document.write("<table border=1><td></td>");
- for(var i=1;i<=liczba;i++){
- document.write("<th>"+i+"</th>");
- }
- for(var k=1;k<=liczba;k++){
- document.write("<tr><th>"+k+"</th>");
- for(var j=1;j<=liczba;j++){
- document.write("<td>"+j*k+"</td>");
- }
- document.write("</tr>");
- }
- document.write("</table>");
- }
- </script>
- </head>
- <body>
- <form name="form1">
- <input type="text" id="f1">
- <button onClick="tablica()">Policz</button>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement