Version compl�te: jsB@nk » Snippet » Un message caché
URL: https://www.javascriptbank.com/a-hidden-message.html
Il suffit de taper le mot "code" et un plan d'action pour activer! Ce script JavaScript activé lorsque vous tapez un code.
Version compl�te: jsB@nk » Snippet » Un message caché
URL: https://www.javascriptbank.com/a-hidden-message.html
<SCRIPT language=javascript>/*A Hidden Message, by YardenST*/ window.onload=restart var code = "code"; //no spaces no special chars chars=code.split("") codes= new Array(); for(var i=0;i<chars.length;i++) { if (code.charCodeAt(i)*1 >= 48 && code.charCodeAt(i)*1 <=57) { codes[i]=code.charCodeAt(i); } else { codes[i]=code.charCodeAt(i)-32; } } function restart() { i=0; document.onkeydown = function(event) { check(i) } } function check(currI) { if(event.keyCode==codes[currI]) { if (i+1==codes.length) { doAction() restart() } document.onkeydown = function(event) { i++; check(i); } } else { restart(); } } function doAction() { alert("You typed the code!") } </SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
Just type the word <b>"code"</b> and an action will activate<!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->