Skip to content

Instantly share code, notes, and snippets.

@azbenny
Created September 28, 2018 23:25
Show Gist options
  • Save azbenny/7189599b34a27d0357c32577190804b5 to your computer and use it in GitHub Desktop.
Save azbenny/7189599b34a27d0357c32577190804b5 to your computer and use it in GitHub Desktop.
background with account maker
<link href="https://fonts.googleapis.com/css?family=Great+Vibes" rel="stylesheet">
<center><h1><center><font style="font-family: 'Great Vibes', cursive; font-size: 90px ">ChatKitty</font></center></h1> </center>
<head>
<style type="text/css"></style>
</head>
<center><div>make an acount:</div>
<!DOCTYPE html>
<html>
<body>
<input id="numb">
<button type="button" onclick="myFunction()">Submit</button>
<p id="demo"></p>
<script>
function myFunction() {
var x, text;
// Get the value of the input field with id="numb"
x = document.getElementById("numb").value;
// If x is Not a Number or less than one or greater than 10
if (isNaN(x) || x < -100000000000000000000000 || x > 100000000000000000000000) {
text = "aleady used <div> (or not a number ) </div>";
} else {
text = "acount made";
}
document.getElementById("demo").innerHTML = text;
}
</script>
</body>
</html> </center>
<!DOCTYPE HTML>
<html>
<head>
<style type="text/css">
body {
background-color: red;
transition: background-color 7s;
}
</style>
</head>
<body>
<script type="text/javascript">
var colors = ["red", "orange", "yellow", "green", "blue", "indigo", "violet"];
var i = 1;
window.setInterval(function(){
document.body.style.backgroundColor = colors[i];
i++;
if (i === colors.length){
i=0;
}
}, 5000);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment