Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. <!doctype html>
  2. <html lang="en">
  3.  
  4. <head>
  5. <meta charset="UTF-8">
  6. <title>Strona - Daniel Jakubowski</title>
  7.  
  8. </head>
  9.  
  10. <body>
  11. <h1> Strona - Daniel Jakubowski</h1>
  12.  
  13. <input type="button" value="Wstecz" onclick="back()">
  14. <input type="button" value="Dalej" onclick="go()">
  15. <br>
  16. <br>
  17. <br>
  18. <input type="button" value="czerwony" onclick="red()">
  19. <input type="button" value="niebieski" onclick="blue()">
  20. <input type="button" value="zielony" onclick="green()">
  21. <br>
  22. <br>
  23. <br>
  24. podaj pierwsza liczbe &nbsp;<input type="tekst" value="" id="first">
  25. podaj druga liczbe &nbsp;<input type="tekst" value="" id="second">
  26. <input type="button" value="porównaj" onclick="get()">
  27. <br>
  28. <br>
  29. <br>
  30. <br>
  31. <p id="text" onclick="change()">Kliknij tekst by zmienic </p> <input type="button" value="wróć" onclick="normal()">
  32. <br>
  33. <br>
  34. <br>
  35. <br>
  36. <script>
  37. function back() {
  38. history.back()
  39. }
  40.  
  41. function go() {
  42. history.go()
  43. }
  44.  
  45. function red() {
  46. document.bgColor = 'red'
  47.  
  48. }
  49.  
  50. function blue() {
  51. document.bgColor = 'blue'
  52.  
  53. }
  54.  
  55. function green() {
  56. document.bgColor = 'green'
  57.  
  58. }
  59.  
  60. function get() {
  61. var a = document.getElementById('first').value
  62. var b = document.getElementById('second').value
  63. if (a > b) {
  64. alert("pierwsza liczba jest większa od drugiej");
  65. } else {
  66. alert("pierwsza liczba nie jest większa od drugiej")
  67. }
  68.  
  69. }
  70.  
  71. function change() {
  72. document.getElementById('text').style.fontSize = '150%'
  73. }
  74.  
  75. function normal() {
  76. document.getElementById('text').style.fontSize = '100%'
  77. }
  78. document.write("ostatnia modyfikacja dokumentu " + document.lastModified)
  79.  
  80. </script>
  81. </body>
  82.  
  83. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement