daily pastebin goal
72%
SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 52 in 147 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. <span style='padding: 20px; display: block; background: #ccc;'>
  3.     Šaldytuvas:
  4.         <button onclick='minus_k()'> - </button>
  5.             <span id='kiek_saldytuvu'>1</span>
  6.         <button onclick='plius_k()'> + </button>
  7. </span>
  8. <br><br>
  9.  
  10. <hr>
  11.  
  12. <button onclick='prideti_preke()'>
  13.     Prideti preke i kortele
  14. </button>
  15. <br>
  16.  
  17.  
  18. <button onclick='minus()'> - </button>
  19. <input type='number' value='1' id='inp_numb'>
  20. <button onclick='plius()'> + </button>
  21.  
  22.  
  23. <script>
  24.     function plius() {
  25.         inp_numb.value = +inp_numb.value + 1
  26.     }
  27.     function minus() {
  28.         inp_numb.value = +inp_numb.value - 1
  29.     }
  30.    
  31.     kiek_saldytuvu_vnt = 1
  32.     function prideti_preke() {
  33.         kiek_saldytuvu_vnt = kiek_saldytuvu_vnt + +inp_numb.value
  34.         kiek_saldytuvu.innerHTML = kiek_saldytuvu_vnt
  35.     }
  36.    
  37.    
  38.     function plius_k() {
  39.         kiek_saldytuvu_vnt += 1
  40.         kiek_saldytuvu.innerHTML = kiek_saldytuvu_vnt
  41.     }
  42.    
  43.     function minus_k() {
  44.         kiek_saldytuvu_vnt -= 1
  45.         kiek_saldytuvu.innerHTML = kiek_saldytuvu_vnt
  46.     }
  47.    
  48. </script>
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