join用来链接数组的,很有用的功能,以偶ajax的时候,用它来链接一些网址之类的东西;

<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script>
var a=[1,2,3,4,5,6];
alert(a.join('-'))
</script>
</head>
<body>

</body>
</html>