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 c4b4ced

Browse files
setInterval in js
1 parent ff97f2f commit c4b4ced

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

‎Basic Introduction/index.html

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,23 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<meta charset="UTF-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>Document</title>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Document</title>
88
</head>
99
<body>
10-
1110

12-
<script>
1311

14-
lettimeout=setTimeout(myFunction,5000);
12+
<script>
1513

16-
function myFunction(){
17-
alert('This is the real method of settimeout function ')
18-
}
14+
let stopTime = setInterval(myFunction , 2000);
1915

20-
let ans = prompt('Enter your age');
16+
function myFunction(){
17+
console.log('please the subscribe...')
18+
}
2119

22-
if(ans < 18)
23-
{
24-
clearTimeout(timeout);
25-
}
26-
27-
</script>
20+
clearInterval(stopTime);
21+
</script>
2822
</body>
2923
</html>

0 commit comments

Comments
(0)

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