javascript toString()将数组转换成字符串
<!DOCTYPE html> <html> <head> <title>将数组转换成字符串</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript"> var arr = new Array(3) arr[0] = "北京" arr[1] = "上海" arr[2] = "广州" document.write(arr.toString()) </script> </head> <body> </body> </html>