-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35cbb4d
commit a3d05fe
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<h1><span id="random"></span> JS Examples <span id="random2"></span></h1> | ||
<ol> | ||
<li> | ||
<h2>Random Characters</h2> | ||
Here's the code: | ||
<hr> | ||
const r = [document.getElementById("random"), document.getElementById("random2")]; | ||
setInterval(() => { | ||
r.forEach(i => { | ||
i.innerHTML = String.fromCharCode(Math.floor(Math.random()*512)); | ||
}); | ||
},25) | ||
<hr> | ||
It does this: | ||
<span id="random3"></span> | ||
</li> | ||
</ol> | ||
</body> | ||
<head> | ||
<title> | ||
JS Examples | ||
</title> | ||
<style> | ||
* { | ||
font-family: Consolas; | ||
} | ||
</style> | ||
<script> | ||
const r = [document.getElementById("random"), document.getElementById("random2"), document.getElementById("random3")] | ||
setInterval(() => { | ||
r.forEach(i => { | ||
i.innerHTML = String.fromCharCode(Math.floor(Math.random()*512)) | ||
}); | ||
},25) | ||
</script> | ||
</head> | ||
</html> |