jquery 刪除字符串最後一個字符的方法

原文連接:http://blog.163.com/li_crane/blog/static/19502097201011281835796/ 字符串:var s = "1,2,3,4,5," 目標:刪除最後一個 "," 方法: s = s.substring( 0 ,s.length - 1 ); 字符串:var s2 = "img/upload/123.jpg" 目標:獲取文件名(不包含後綴名)
相關文章
相關標籤/搜索