String.substr(start [, length]): if the length is not specified, it will subtract from the start position to the end of the string.
var str = "javascript endmemo"; alert(str.substr(5)); //cript endmemo alert(str.substr(5,10)); //cript endm
If the start position < 0, it will start from the end:
var str = "javascript endmemo"; alert(str.substr(-5)); //dmemo
var str = "中国人民银行"; alert(str.substr(-5)); //国人民银行 alert(str.substr(2,4)); //人民银行