那串字符前后是什么,能否详细描述?
- 内容介绍
- 文章标签
- 相关推荐
本文共计65个文字,预计阅读时间需要1分钟。
javascript字符串分割函数var keyValue='string'function splitString(string, str) { var currentKey=string.split(str)[0]; var currentValue=string.split(str)[1]; console.log('前' + currentKey + '后' + currentValue);}splitString(keyValue, 'r')
var keyValue = 'string' function getStr(string,str){ var currentKey = string.split(str)[0]; var currentValue = string.split(str)[1]; console.log('前'+ currentKey + '后' + currentValue); } getStr(keyValue,'r')
本文共计65个文字,预计阅读时间需要1分钟。
javascript字符串分割函数var keyValue='string'function splitString(string, str) { var currentKey=string.split(str)[0]; var currentValue=string.split(str)[1]; console.log('前' + currentKey + '后' + currentValue);}splitString(keyValue, 'r')
var keyValue = 'string' function getStr(string,str){ var currentKey = string.split(str)[0]; var currentValue = string.split(str)[1]; console.log('前'+ currentKey + '后' + currentValue); } getStr(keyValue,'r')

