<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>数组连接</title>
<script>
var a=[1,2,3];
var b=[4,5,6];
//alert(a.concat(b)); //将a,b两个数组以a前b后连接
alert(b.concat(a)); //将a,b两个数组以b前a后连接
</script>
</head>
<body>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>数组连接</title>
<script>
var a=[1,2,3];
var b=[4,5,6];
//alert(a.concat(b)); //将a,b两个数组以a前b后连接
alert(b.concat(a)); //将a,b两个数组以b前a后连接
</script>
</head>
<body>
</body>
</html>