_慕慕_
2019-07-09 11:21
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Array对象 </title>
<script type="text/javascript">
var myarr1= ["我","爱","你"];
document.write(myarr1.slice(1,4));
</script>
</head>
<body>
</body>
</html>
你可以直接这样写:
document.write(myarr1.slice(myarr1.indexOf("爱")));
你直接(1)也可以,document.write(myarr1.slice(1));
懂了,逗号不算哎
JavaScript进阶篇
468195 学习 · 21891 问题
相似问题