<html>
<body>

<script type="text/javascript">

var str="0123456789!"

document.write(str.substring(3,7))      //输出 3456

</script>

</body>
</html>


stringObject.substring(start,stop)

substring() 方法返回的子串包括 start 处的字符,但不包括 stop 处的字符。

相关文章:

  • 2022-01-07
猜你喜欢
  • 2021-12-10
  • 2022-12-23
  • 2021-12-12
  • 2021-10-21
相关资源
相似解决方案