您的位置:首页 > Web前端 > JavaScript

javascript:数组对象的一些方法

2012-06-08 19:43 731 查看
<html>
<head>
<title>1</title>
<style type='text/css'>
#box{
width:300px;
height:200px;
border:dashed 1px green;
}
</style>
</head>
<body>
<div id='box'>
</div>
<script language='javascript'>
var array=[1,3,14,5,19,10];
//document.write(array.splice(2,2));
//document.write(array.slice(2,2));
document.write(array);
document.write("<br/>");
document.write(array.join('')+'<br/>');//指定分隔符
var str="jsp jsp web web";
document.write(str.split(" "));
</script>

</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: