老师,这个获取到的是正确的吗?

来源:3-6 编程练习

my_secret_web

2017-11-02 10:45:04

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>charCodeAt()</title>
</head>
<body>
<script>
var str="Work hard, earn money.";
    var strKey=str.indexOf("a");//补充代码
    document.write(strKey+"<br>");//补充代码
    var strkey=str.charCodeAt(strKey);
    document.write(strkey);
</script>
</body>
</html>

写回答

1回答

Miss路

2017-11-02

正确,继续加油!

0
hy_secret_web
h 非常感谢!
h017-11-04
共1条回复

0 学习 · 36712 问题

查看课程