HuShu
Follow

After following, you can keep track of his dynamic information in a timely manner

Course notes
  • Courses in the relevant section:Character methods in JavaScript: you’ve been using them before you know it

    charAt(索引)//访问指定位置字符 insexOf('字符') //该字符第一次出现的位置 lastIndexOf('字符') // 该字符最后一次出现的位置 substr(3,2) // 从索引为3的位置起,输出2个字符 subString(3,str.length) // 索引为3的地方起,输出到字符串长度之前的位置(不包含该位置) replace('PHP','JAVA') // 将字符串PHP替换为JAVA

    split('*') // 以*号截取,存入数组中

    toUpperCase() //将字符串进行大写转换 toLowerCase() //将字符串进行小写转换

    2020-06-010个赞