30 lines
751 B
JavaScript
30 lines
751 B
JavaScript
function callback(){
|
|
return function(){
|
|
alert("We're really sorry about that.");
|
|
window.location = '/';
|
|
}
|
|
}
|
|
var a = "world";
|
|
setTimeout(callback(), 7000);
|
|
|
|
function type(n, t) {
|
|
var str = document.getElementsByTagName("code")[n].innerHTML.toString();
|
|
var i = 0;
|
|
document.getElementsByTagName("code")[n].innerHTML = "";
|
|
|
|
setTimeout(function() {
|
|
var se = setInterval(function() {
|
|
i++;
|
|
document.getElementsByTagName("code")[n].innerHTML =
|
|
str.slice(0, i) + "|";
|
|
if (i == str.length) {
|
|
clearInterval(se);
|
|
document.getElementsByTagName("code")[n].innerHTML = str;
|
|
}
|
|
}, 10);
|
|
}, t);
|
|
}
|
|
|
|
type(0, 0);
|
|
type(1, 600);
|
|
type(2, 1300); |