案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<body>
3
4
<script type="text/javascript">
5
6
var str="Hello world!"
7
document.write("The Unicode for the first character is: " + str.charCodeAt(0) + "<br />")
8
document.write("The Unicode for the second character is: " + str.charCodeAt(1) + "<br />")
9
document.write("The Unicode for the third character is: " + str.charCodeAt(2))
10
11
</script>
12
13
</body>
14
</html>
15