码迷,mamicode.com
首页 > Web开发 > 详细

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

时间:2016-09-16 15:28:30      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:

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

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

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

标签:

原文地址:http://www.cnblogs.com/lykouyi/p/5876425.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!