daily pastebin goal
48%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!Doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Tabliczka 2</title>
  6. <script>
  7. function tablica(){
  8. var liczba=parseInt(form1.f1.value);
  9. document.write("<table border=1><td></td>");
  10. for(var i=1;i<=liczba;i++){
  11. document.write("<th>"+i+"</th>");
  12. }
  13.         for(var k=1;k<=liczba;k++){
  14.         document.write("<tr><th>"+k+"</th>");
  15.    
  16.                 for(var j=1;j<=liczba;j++){
  17.             document.write("<td>"+j*k+"</td>");
  18.                 }
  19.        
  20.             document.write("</tr>");
  21.         }
  22.     document.write("</table>");
  23. }
  24. </script>
  25. </head>
  26. <body>
  27. <form name="form1">
  28. <input type="text" id="f1">
  29. <button onClick="tablica()">Policz</button>
  30. </form>
  31. </body>
  32. </html>
RAW Paste Data
Top