赞
踩
结果
var str = "There are surprises dlrow olleh in the tasks you are going to accomplish."
str1 = str.substr(20,11)
// console.log(str1.length)
// console.log(str1)
str1=str1.split("").reverse().join("").toUpperCase()
str0=str.substr(0,20)
str2=str.substr(31,str.length-31)
str3=str0+str2+str1
console.log(str3)
substr取出相应位置的字符串,对指定的20~30位字符串进行转换数组、反转、转大写、再合并操作
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。