teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

実際のコードを元に一部修正しました

2021/03/11 07:11

投稿

X001017
X001017

スコア6

title CHANGED
File without changes
body CHANGED
@@ -6,10 +6,13 @@
6
6
  ```JavaScript
7
7
  let point = [];
8
8
 
9
+ let width = window.innerWidth;
10
+ let height = window.innerHeight;
9
11
  let x0 = null;
10
12
  let y0 = null;
11
13
 
12
14
  window.addEventListener('mousemove', (event) => {
15
+ point[];
13
16
  x0 = Math.floor(((event.clientX / width) * 100));
14
17
  y0 = Math.floor(((event.clientY / height) * 100));
15
18
  //計算の呼び出し
@@ -18,7 +21,6 @@
18
21
  console.log(point[key].x);
19
22
  console.log(point[key].y);
20
23
  }
21
- point[];
22
24
  }, false);
23
25
 
24
26
  function test(x0, y0) {