let arr = '["qq","nn","555","456"]' let b= eval(arr) 一个神奇的eval()函数就能搞定
代码
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <script src="http://code.jquery.com/jquery-1.8.0.min.js"></script> <title></title> </head> <body> </body> <script type="text/javascript"> var arr = '["qq","nn","555","456"]' var b = eval(arr) console.log(b) </script> </html>