SHARE
TWEET

Untitled

a guest Dec 9th, 2019 118 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.     <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7.     <title>Document</title>
  8. </head>
  9. <body>
  10.     <h1>Zadanie z continue</h1>
  11.     <small>Hubert Zabraniak</small>
  12.     <hr>
  13.     A:<input type="number" name="" id="a"><br>
  14.     <button onclick="run(); return false;">Submit</button>
  15.     <p id="out"></p>
  16.     <hr>
  17.  
  18.     <script>
  19.    
  20.     function run(){
  21.  
  22.         var a = document.getElementById("a").value;
  23.         var output = document.getElementById("out");
  24.         var cache = "";
  25.  
  26.         a = Number(a);
  27.  
  28.         for(var i=1;i<=15;i++){
  29.  
  30.             if(i==a){
  31.                 cache = cache+"- ";
  32.                 continue;
  33.             }
  34.  
  35.             cache = cache+i+" ";
  36.         }
  37.  
  38.         output.innerHTML = cache;
  39.        
  40.     }
  41.  
  42.     </script>
  43. </body>
  44. </html>
  45.  
  46. <!DOCTYPE html>
  47. <html lang="en">
  48. <head>
  49.     <meta charset="UTF-8">
  50.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  51.     <meta http-equiv="X-UA-Compatible" content="ie=edge">
  52.     <title>Document</title>
  53. </head>
  54. <body>
  55.     <h1>Zadanie z break</h1>
  56.     <small>Hubert Zabraniak</small>
  57.     <hr>
  58.     A:<input type="number" name="" id="a"><br>
  59.     <button onclick="run(); return false;">Submit</button>
  60.     <p id="out"></p>
  61.     <hr>
  62.  
  63.     <script>
  64.    
  65.     function run(){
  66.  
  67.         var a = document.getElementById("a").value;
  68.         var output = document.getElementById("out");
  69.         var cache = "";
  70.  
  71.         a = Number(a);
  72.  
  73.         for(var i=1;i<=60;i++){
  74.  
  75.             cache = cache+i+" ";
  76.  
  77.             if(i==a){
  78.                 break;
  79.             }
  80.         }
  81.  
  82.         output.innerHTML = cache;
  83.        
  84.     }
  85.  
  86.     </script>
  87. </body>
  88. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top