-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs-prg.html
46 lines (40 loc) · 943 Bytes
/
js-prg.html
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
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<select>
<option>1</option>
</select>
<button onclick="changeFont()">Button</button>
<script>
function changeFont() {
const el= document.querySelector("#lastEl");
el.style.fontsize="20px";
el.style.color="red";
}
function downKey(e) {
console.log(e);
const el = document.querySelector("#LastEl");
const input = document.querySelector("#input");
eL.innerHTML = input.value;
}
function upKey() {
console.log("I am up key")
}
function pressKey() {
console.log("I am press key")
}
document.addEventListener("Keydown" , changeBallPosition);
function changeBallPosition(e) {
console.log(e.KeyCode);
if(e.KeyCode==13) {
}
}
</script>
</body>
</html>