Introduction to the JavaScript substring() method ... The substring() method accepts two parameters: startIndex and endIndex : ... If you omit the endIndex , the ... ... <看更多>
You can use the substring method of JavaScript string objects: s = s.substring(0, s.length - 4). It unconditionally removes the last four characters from ... ... <看更多>