-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtextchanger.html
69 lines (53 loc) · 1.57 KB
/
textchanger.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!---
Simple Javascript text changer
Diyar Par
-->
<!DOCTYPE html>
<html lang="sv">
<head>
<meta charset="utf-8">
<title>Javascript</title>
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content=" " />
<meta name="robots" content="index, follow"/>
<meta name="description" content="There will be description here....">
<meta name="resource-type" content="document"/>
<meta name="distribution" content="global"/>
<meta name="author" content="diypa571"/>
<meta name="copyright" content="[email protected]"/>
</head>
<body>
<p id="txtshow"> Simple javascript </p>
<script>
// This is the first text
let showtxt1 =" Iam the first text...";
// This is the second text
let showtxt2 =" Iam the second test...";
// This is the third text
let showtxt3 =" Iam the third...";
// And you can add as many texts you want...
// Just remember this... if(numberforinc == 3)
// modify the condition...
let numberforinc = 0;
setInterval(function(){
numberforinc += 1;
if(numberforinc == 1) {
console.log(showtxt1);
document.getElementById("txtshow").innerHTML = showtxt1 ;
}
if(numberforinc == 2) {
console.log(showtxt2);
document.getElementById("txtshow").innerHTML = showtxt2 ;
}
if(numberforinc == 3) {
console.log(showtxt3);
document.getElementById("txtshow").innerHTML = showtxt3 ;
}
if(numberforinc == 3) {
numberforinc =0;
}
}, 1000);
</script>
<body>
</html>