JS字符串转数组,获取字符串长度。 字符串转数组: var str = '哈哈哈哈哈'; var arr = str.split(''); console.log(arr); 获取字符串长度 str.length