js截取某个字段后面的字符串

 var str = 'p2p-dafei';
 console.log(str.split("p2p-")[1]);
//截取p2p-后面的所有参数

猜你喜欢

转载自blog.csdn.net/gyq04551/article/details/80318596