截取最后一个下划线前面的字符
var str=test_order_zhang_201703222332; var laststr=str.lastIndexOf('_'); var newStr=str.substring(0,laststr); 结果 :test_order_zhang
————————
来源:https://blog.csdn.net/zxf1242652895/article/details/64920218
var str=test_order_zhang_201703222332; var laststr=str.lastIndexOf('_'); var newStr=str.substring(0,laststr); 结果 :test_order_zhang
————————
来源:https://blog.csdn.net/zxf1242652895/article/details/64920218