<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<script language="JavaScript" type="text/javascript" src="js.js"> </script>
<title>Žlab Matice </title>
<style>
body {margin:0}
textarea {border:0;background:#000;color:lime;font-weight:bold;
height:100%;width:100%}
</style>
</head>
<body onload="starmatrix()">
<textarea name="cmd" id="cmd" onkeydown="klav()">root# </textarea>
</body>
</html>
JS soubor
//myDiv = document.getElementById("myDivElement");
function starmatrix()
{
init();
//terminate();
}
function init()
{
var starttext="Žlab Matrix has started...";
vypisstart(starttext,0);
cmd.focus();
}
function vypisstart(starttext,pozice)
{
if (starttext.length==pozice) {
return;}
vypis(pozice);
vypis(starttext[pozice]);
pozice2=pozice+1;
//setInterval("vypisstart('"+starttext+"','"+pozice2+"')",1000);
//setTimeout("vypisstart('"+starttext+"',"+pozice2+")",100);
setTimeout(vypisstart(starttext,pozice),100);
}
function vypis(prikaz)
{
var cmd = document.getElementById("cmd");
cmd.value +=prikaz;
}
function klav()
{
var text=document.getElementById("cmd").value;
var pozice=text.length-1;
var posledni=text.charCodeAt(pozice);
var prikaz=text.charAt(pozice);
vypis(posledni);
if (posledni==10)
{
window.alert(text);
}
}