在写黑客帝国文字特效的时候,字母是随机出现生成的
使用String.fromCharCode()即可转换unicode为字母
这是W3Cschool给的例子
<script type="text/javascript"> document.write(String.fromCharCode(72,69,76,76,79)) document.write("<br />") document.write(String.fromCharCode(65,66,67)) </script>
使用Math随机产生数字,65-90||97-122
使用String.fromCharCode()就可以随机生成A-Z||a-z的字母了