js 仿 asp中的 asc 和 chr 函数的代码

<script type="text/javascript">
var str;
var asc;

str = "A";
document.write(str.charCodeAt(0));
asc = 65;
document.write(String.fromCharCode(asc));
</script>

posted @ 2016-09-16 14:40  码农耕耘  阅读(1186)  评论(0编辑  收藏  举报