Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3402724

Browse files
scroll event in js
1 parent 1fb5a3f commit 3402724

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

‎Basic Introduction/index.html

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,19 @@
88

99
<style>
1010

11-
#box{
12-
height: 100px;
13-
width: 100px;
14-
background-color: blueviolet;
15-
cursor: pointer;
11+
body{
12+
height: 300vh;
1613
}
17-
1814
</style>
1915
</head>
2016
<body>
21-
22-
<div id="box" ondblclick="myFunc()"></div>
2317

2418
<script>
2519

26-
window.addEventListener('keydown' , cheakKey)
27-
28-
function cheakKey(event){
29-
console.log(event.key)
30-
}
20+
window.addEventListener('scroll' , function(){
21+
console.log("scrolling.....");
22+
})
3123
</script>
24+
3225
</body>
3326
</html>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /