ICE Key Generator: Difference between revisions
Jump to navigation
Jump to search
TomEdwards (talk | contribs) (Improved HTML) |
m (br removal) |
||
| Line 25: | Line 25: | ||
document.write(out); | document.write(out); | ||
} | } | ||
document.write('</span | document.write('</span>'); | ||
</script></pre> | </script></pre> | ||
Revision as of 16:00, 18 May 2006
Source code
<script language="JavaScript" type="text/javascript">
var chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()_+-=[]{};/., ~`:<>?';
var l = chars.length-1;
document.write('<span style="font-size:5em;">');
for(var x=0;x<=7;x++)
{
var chr = chars.charAt(Math.round(Math.random(new Date().getSeconds())*l));
var out;
switch(chr)
{
case '<':
out = '<';
break;
case '>':
out = '>';
break;
case '&':
out = '&';
break;
default:
out = chr;
break;
}
document.write(out);
}
document.write('</span>');
</script>