使用"substring"结合"indexOf":
var sample = 'Remove stuff before this word. Hello!';
var substr = sample.substring(sample.indexOf('word')); //substr = 'word. Hello!'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4713 次 |
| 最近记录: |