相关代码var colorText = 'red,blue,green,yellow'; colorText.split(/[^\,]+/);// ["", ",", ",", ",", ""] 查看完整描述