You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
2.1 KiB
HTML

5 years ago
<!DOCTYPE html>
<html>
<head>
<title>Tao</title>
<script src="http://blizardjs.ueuo.com/blizard.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@1.0.0/lib/p5.js"></script>
<script type="text/javascript" src="sketch.js"></script>
<script type="text/javascript" src="array.js"></script>
<style type="text/css">
body {
width: 100%;
height: 100%;
margin: 0px;
background-color: black;
font-family: "Lucida Console", Monaco, sans-serif;
color: black;
}
.window {
position: absolute;
height: 100%;
width: 100%;
}
#centered {
color: rgb(25, 196, 98);
margin: 0;
position: absolute;
top: 50%;
left: 50%;
margin-right: -50%;
font-size:18px;
transform: translate(-50%, -50%);
text-align: center;
line-height: 1.6;
}
</style>
</head>
<body>
<div class="window">
<div id="centered">
<p id="text"></p>
<button id="btn" onclick="next()">next</button><br>
</div>
</div>
<script type="text/javascript">
var txt = 0;
var ptag = document.getElementById('text');
ptag.innerHTML = x[txt];
function next() {
if (txt >= x.length -1){
txt = txt;
end();
} else {
txt += 1;
var ptag = document.getElementById('text');
ptag.innerHTML = x[txt];
}
}
function end(){
var ptag = document.getElementById('btn');
ptag.innerHTML = "<b>END</b>";
for (var i = 0; i < x.length + 90; i++) {
var btn = document.createElement("BUTTON");
btn.innerHTML = "<b>END</b>";
btn.title = x[i];
var br = document.createElement("br");
var main = document.getElementById('centered');
main.appendChild(btn);
main.appendChild(br);
document.body.style.height = "6000px";
//sl.createElement("P","BODY","prova");
//sl.print("prova","ciao");
}
}
</script>
</body>
</html>