在jsp页面中怎样截取字符串

2025-03-09 21:00:55
推荐回答(3个)
回答1:

String newstr = 需要被截取的源字符串.substring(0, 15)+"……";

回答2:

var str="Hello world!"
document.write(str.substr(3))

输出
lo world!

回答3:

你可以用javascript代码写 substring(startIndex,endIndex);