Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <title>Event</title>
  5.  
  6. <style>
  7.     p {font-size:25px;color:#FC3;text-align:center}
  8.     h1 {text-align:center; color:#FC3}
  9. </style>
  10.  
  11. </head>
  12.  
  13. <body background="background.jpg" style="background-size:cover">
  14.  
  15. <form background="background.jpg" style="background-size:cover">
  16.     <b>
  17.         <p style="font-family:'Times New Roman', Times, serif;font-size:60px;color:#FC3;text-align:center">
  18.             Welcome to "A Night Out"
  19.         </p>
  20.     </b>
  21.     <b>
  22.         <p style="font-family:'Times New Roman', Times, serif;font-size:25px;color:#FC3;text-align:center">
  23.             This is an event that is going to be taking place South Park from 04:00pm to 01:00am on the 12th of March 2020
  24.         </p>
  25.     </b>
  26.  
  27. <br><br><br><br>
  28.  
  29.     <hr>
  30.  
  31. <br><br><br>
  32.  
  33.     <h1>Get your tickets</h1>
  34.  
  35. <br><br><br>    
  36.  
  37. <form>
  38.  
  39.     <p>Kids pass: 11$ <input type="button" value="add to cart" id="kids id" onclick="kids()"></p>
  40. <br><br>
  41.     <p>One person pass: 15$ <input type="button" value="add to cart" id="1 person id" onclick="one()"></p>  
  42. <br><br>
  43.     <p>Couples pass: 25$ <input type="button" value="add to cart" id="couples id" onclick="couples()"></p>
  44. <br><br>
  45.     <p>Family pass: 50$ <input type="button" value="add to cart" id="family id" onclick="family()"></p>
  46. <br><br>
  47.     <p>Elders pass: 13$ <input type="button" value="add to cart" id="elders id" onclick="elders()"></p>
  48.  
  49. </form>
  50.  
  51. <br><br><br><br><br>
  52.  
  53.     <h1>VIP tickets</h1>
  54.  
  55. <br><br><br>
  56.  
  57. <form>
  58.  
  59.     <p>Kids VIP pass: 20$ <input type="button" value="add to cart" id="kids vip id" onclick="vipkids()"></p>
  60. <br><br>
  61.     <p>One person VIP pass: 27$ <input type="button" value="add to cart" id="1 person vip id" onclick="vipone()"></p>
  62. <br><br>
  63.     <p>Couples VIP pass: 50$ <input type="button" value="add to cart" id="couples vip id" onclick="vipcouples()"></p>
  64. <br><br>
  65.     <p>Family VIP pass: 90$ <input type="button" value="add to cart" id="family vip id" onclick="vipfamily()"></p>
  66. <br><br>
  67.     <p>Elders VIP pass: 25$ <input type="button" value="add to cart" id="elders vip id" onclick="vipelders()"></p>
  68.  
  69. </form>
  70.  
  71. <br><br><br><br>
  72.  
  73.     <hr>
  74.  
  75. <br><br><br>
  76.  
  77.     <h1>Cart</h1>
  78.  
  79. <br><br><br>
  80.  
  81. <p id="p9">Kids pass</p>
  82. <p id="p1">One person pass</p>
  83. <p id="p2">Couples pass</p>
  84. <p id="p3">Family pass</p>
  85. <p id="p4">Elders pass</p>
  86. <p id="p10">Kids VIP pass</p>
  87. <p id="p5">One person VIP pass</p>
  88. <p id="p6">Couples VIP pass</p>
  89. <p id="p7">Family VIP pass</p>
  90. <p id="p8">Elders VIP pass</p>
  91.  
  92. <br><br>
  93.  
  94. <p id="total">Your total bill is: 0$</p>
  95.  
  96. <script>
  97.   var totalText = document.getElementById("total");
  98.  
  99. var kid = 0
  100. var one = 0
  101. var cou = 0
  102. var fam = 0
  103. var eld = 0
  104.  
  105. var vkid = 0
  106. var vone = 0
  107. var vcou = 0
  108. var vfam = 0
  109. var veld = 0
  110.  
  111. var k = 0
  112. var o = 0
  113. var c = 0
  114. var f = 0
  115. var e = 0
  116.  
  117. var vk = 0
  118. var vo = 0
  119. var vc = 0
  120. var vf = 0
  121. var ve = 0
  122.  
  123. function kids() {
  124.     document.getElementById("p9").innerHTML="Kids pass purchesed"
  125.     document.getElementById("p9").style.color="green"
  126.     document.getElementById("kids id").value="ADDED"
  127.     kid = k + 11
  128.     printTotal();
  129. }
  130.  
  131. function one() {
  132.     document.getElementById("p1").innerHTML="One person pass purchesed"
  133.     document.getElementById("p1").style.color="green"
  134.     document.getElementById("1 person id").value="ADDED"
  135.     one = o + 15
  136.     printTotal();
  137. }
  138.  
  139. function couples() {
  140.     document.getElementById("p2").innerHTML="Couples pass purchesed"
  141.     document.getElementById("p2").style.color="green"
  142.     document.getElementById("couples id").value="ADDED"
  143.     cou = c + 25
  144.     printTotal();
  145. }
  146.  
  147. function family() {
  148.     document.getElementById("p3").innerHTML="Family pass purchesed"
  149.     document.getElementById("p3").style.color="green"
  150.     document.getElementById("family id").value="ADDED"
  151.     fam = f + 50
  152.     printTotal();
  153. }
  154.  
  155. function elders() {
  156.     document.getElementById("p4").innerHTML="Elders pass purchesed"
  157.     document.getElementById("p4").style.color="green"
  158.     document.getElementById("elders id").value="ADDED"
  159.     eld = e + 13
  160.     printTotal();
  161. }
  162.  
  163. function vipkids() {
  164.     document.getElementById("p10").innerHTML="Kids VIP pass purchesed"
  165.     document.getElementById("p10").style.color="green"
  166.     document.getElementById("kids vip id").value="ADDED"
  167.     vkid = vk + 20
  168.     printTotal();
  169. }
  170.  
  171. function vipone() {
  172.     document.getElementById("p5").innerHTML="One person VIP pass purchesed"
  173.     document.getElementById("p5").style.color="green"
  174.     document.getElementById("1 person vip id").value="ADDED"
  175.     vone = v0 + 27
  176.     printTotal();
  177. }
  178.  
  179. function vipcouples() {
  180.     document.getElementById("p6").innerHTML="Couples VIP pass purchesed"
  181.     document.getElementById("p6").style.color="green"
  182.     document.getElementById("couples vip id").value="ADDED"
  183.     vcou = vc + 50
  184.     printTotal();
  185. }
  186.  
  187. function vipfamily() {
  188.     document.getElementById("p7").innerHTML="Family VIP pass purchesed"
  189.     document.getElementById("p7").style.color="green"
  190.     document.getElementById("family vip id").value="ADDED"
  191.     vfam = vf + 95
  192.     printTotal();
  193. }
  194.  
  195. function vipelders() {
  196.     document.getElementById("p8").innerHTML="Elders VIP pass purchesed"
  197.     document.getElementById("p8").style.color="green"
  198.     document.getElementById("elders vip id").value="ADDED"
  199.     veld = ve + 25
  200.     printTotal();
  201. }
  202.  
  203.   function printTotal() {
  204.     var total = kid + one + cou + fam + eld + vkid + vcou + vfam + veld
  205.     totalText.textContent = `Your total bill is: ${total}$`;
  206.     console.log(total);
  207.   }
  208. </script>
  209.  
  210.  
  211. </body background="background.jpg" style="background-size:cover">
  212. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement