1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Aléaquoi?</title>
<style type="text/css">
#mess{
font-weight:bold;
font-size:25px;
}
</style>
<script type="text/javascript">
var tab2=[], n, lettres, bis, cosi, d, h;
var plus=1+new Date().getMilliseconds();
function random(disp){
var dep=parseInt(String(new Date().getMilliseconds()).charAt(0))+3;
var tab=["b","c","d","f","g","j","l","m","n","p","r","s","t","v","x","z","fr","br","tr","cl","gn","pl","qu","ch"]
var tab1=["a","e","i","o","u","é","è","ai","au","ou","oi","en","in","an","on","er","y"];
d=parseInt(new Date().getMilliseconds()+""+Math.ceil(new Date().getSeconds()/60*100)+""+Math.ceil(new Date().getMinutes()/60*100)+""+Math.ceil(new Date().getHours()/24*100));
for(k=0;k<6;k++){// combien de sons?
d+=plus;
cosi=Math.cos(d);
plus+=parseInt(String(d).substring(0,3));
n=String(Math.abs(cosi));
n= cosi >0 ? n: "0."+ n.substring(2).split("").reverse().join("");
lettres= k%2 == 0 ? tab : tab1;
h=Math.floor(parseFloat("0."+n.substring(dep))*lettres.length);
if(dep<n.length){dep++}else{dep=3}
tab2[k]=lettres[h];
bis=lettres[h]
if((" "+tab2.toString()+" ").split(lettres[h]).length==3){
lettres.splice(h,1)
}
}
disp.firstChild.data=tab2.join('');
}
</script>
</head>
<body>
<div style="text-align:center;margin-top:100px">
<span id="mess">?</span>
<p>
<input type="button" style="font-size:20px;font-weight:bold;" value="random" onclick="random(document.getElementById('mess'))" /><br />
</p>
</div>
</body>
</html> |
Partager