1,273   JS

js函数需要一个json数组,将字符串数组传过去时一直报错,因为字符串数组和json数组打印出来时长得一样的,迟迟没找原因
后来百度了一番才发现要将字符串数组转出json数组,如下方法


availableTags = eval('(' + hasTags + ')');



Leave a Reply

Your email address will not be published. Required fields are marked *