代码如下:
var str="abcdefghhhh";//截取后4位 str.substring(str.length-4);
js截取字符串的后几位数
原文:https://www.cnblogs.com/xiaozhang666/p/12425993.html