Brilliant8866
2021-08-05 16:58
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<script type="text/javascript">
var mystr="86-010-85468578";
document.write(mystr.split("-")+ "<br>");
document.write(mystr.split("") + "<br>");
document.write(mystr.split("", 3);
</script>
</head>
<body>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<script type="text/javascript">
var mystr="86-010-85468578";
document.write(mystr.split("-")+ "<br>");
document.write(mystr.split("") + "<br>");
document.write(mystr.split("", 3)); //<---这里少了个后括号
</script>
</head>
<body>
</body>
</html>
document.write(mystr.split("", 3);你这句的括号呢??
JavaScript进阶篇
468061 学习 · 21891 问题
相似问题