How can I use jquery on the client side to substring "nameGorge" and remove "name" so it outputs just "Gorge"?
var name = "nameGorge"; //output Gorge
No jQuery needed! Just use the substring method:
var gorge = name.substring(4);
Or if the text you want to remove isn't static:
var name = 'nameGorge'; var toRemove = 'name'; var gorge = name.replace(toRemove,'');
1.4m articles
1.4m replys
5 comments
57.0k users