Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta charset="UTF-8">
  4. <title>
  5. Portal ogłoszeniowy
  6. </title>
  7. <link href="style5.css" rel="stylesheet"/>
  8. </head>
  9. <body>
  10. <div id="baner"><h1>„Portal Ogłoszeniowy”</h1></div>
  11. <div id="panel1"><img src="rysunek1.png"></div>
  12. <div id="panel2"><h3>Adres</h3>ul. Morska 45 <p>Gdynia</div>
  13. <div id="panel3"><h3>Telefon</h3><p>601601601</div>
  14. <div id="panel4"><h3>e-mail</h3><p>ogloszenia@poczta.pl</div>
  15. <div id="blok1">
  16. <h2>Ceny ogłoszeń</h2>
  17. <table border=1 style="border-color:green;">
  18. <tr><td>Liczba ogłoszeń</td><td>Cena ogłoszeń</td><td>Bonus</td></tr>
  19. <tr><td>1-50</td><td>2 PLN</td><td rowspan=2> Subskrypcja newslettera to upset 0.20 PLN na ogłoszenie</td></tr>
  20. <tr><td>51 i więcej</td><td>1 PLN</td></td></tr>
  21. </table></div>
  22. <div id="blok2">
  23. <h2>Witamy na stronie naszego portalu!</h2>
  24. <img src="rysunek.png" alt="ogłoszenia"/>
  25. </div>
  26. <div id="blok3">
  27. <h2>Ile kosztuje ogłoszenie?</h2>
  28. <form name="formularz">
  29. Podaj liczbę ogłoszeń:<br><input type="number" name="a"></input><br>
  30. <input type="checkbox" name="b"/>Policz upust na newsletter<br>
  31. <input type="button" value="Oblicz" onclick="funkcja()" style="background-color:green;color:white;border:none;">
  32. </form>
  33. <span id="napis"/>
  34. <script>
  35. function funkcja()
  36. {
  37. var a=document.formularz.a.value;
  38. var b=document.formularz.b.checked;
  39. var c=a*2-0.2*a;
  40. var d=a-(0.2*a);
  41. if(a<=50 && b==true)
  42. document.getElementById("napis").innerHTML="Koszt ogłoszeń: "+c+"PLN";
  43. if(a>50 && b==true)
  44. document.getElementById("napis").innerHTML="Koszt ogłoszeń: "+d+"PLN";
  45. if(a<=50 && b==false)
  46. document.getElementById("napis").innerHTML="Koszt ogłoszeń: "+a*2+"PLN";
  47. if(a>50 && b==false)
  48. document.getElementById("napis").innerHTML="Koszt ogłoszeń: "+a+"PLN";
  49.  
  50. }
  51. </script>
  52. </div>
  53. <div id="stopka">Portal ogłoszeniowy opracował: Kacper</div>
  54. </body>
  55. </html>
  56.  
  57.  
  58. ///////////////
  59. CSS
  60.  
  61. #baner
  62. {
  63. background:#009999;
  64. text-align:center;
  65. color:white;
  66. height:80px;
  67. width:100%;
  68. }
  69. #panel1
  70. {
  71. font-family:Arial;
  72. text-align:center;
  73. background:#009999;
  74. float:left;
  75. color:white;
  76. height:150px;
  77. width:25%;
  78. }
  79. #panel2
  80. {
  81. font-family:Arial;
  82. text-align:center;
  83. background:#009999;
  84. color:white;
  85. float:left;
  86. height:150px;
  87. width:25%;
  88. }
  89. #panel3
  90. {
  91. font-family:Arial;
  92. text-align:center;
  93. background:#009999;
  94. color:white;
  95. float:left;
  96. height:150px;
  97. width:25%;
  98. }
  99. #panel4
  100. {
  101. font-family:Arial;
  102. text-align:center;
  103. background:#009999;
  104. color:white;
  105. float:left;
  106. height:150px;
  107. width:25%;
  108. }
  109. #blok1
  110. {
  111. background:#669999;
  112. float:left;
  113. height:600px;
  114. width:30%;
  115. }
  116. #blok2
  117. {
  118. text-align:center;
  119. background:#99CCCC;
  120. float:left;
  121. height:600px;
  122. width:40%;
  123. }
  124. #blok3
  125. {
  126. background:#669999;
  127. float:left;
  128. height:600px;
  129. width:30%;
  130. }
  131. #stopka
  132. {
  133. background: #009999;
  134. color:white;
  135. text-align:center;
  136. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement