-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheksperyment.html
More file actions
executable file
·37 lines (32 loc) · 1.24 KB
/
eksperyment.html
File metadata and controls
executable file
·37 lines (32 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Eksperyment</title>
<link rel="stylesheet" href="styles.css">
<style>
#grow {
padding: 0;
}
</style>
</head>
<body>
<h1><3</h1>
<button type="submit" id="yes" onclick="">Tak</button>
<button type="submit" id="no" onmouseover="myFunction()">Nie</button>
<script>
function myFunction() {
var button = document.getElementById("yes");
var currentPaddingTop = parseInt(window.getComputedStyle(button).paddingTop);
var currentPaddingRight = parseInt(window.getComputedStyle(button).paddingRight);
var currentPaddingBottom = parseInt(window.getComputedStyle(button).paddingBottom);
var currentPaddingLeft = parseInt(window.getComputedStyle(button).paddingLeft);
button.style.paddingTop = (currentPaddingTop + 10) + "px";
button.style.paddingRight = (currentPaddingRight + 20) + "px";
button.style.paddingBottom = (currentPaddingBottom + 10) + "px";
button.style.paddingLeft = (currentPaddingLeft + 20) + "px";
}
</script>
</body>
</html>