js retained several former, after a few characters

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/zhaofuqiangmycomm/article/details/88558715
str.substring (Start subscript, superscript end);

var str="1234567890test";
str.substring(0, 10);

  alert(str);

Guess you like

Origin blog.csdn.net/zhaofuqiangmycomm/article/details/88558715