i have one url Like http://www.example.com/wall/post/1234568929842184
now i want to take the number after post/ from my url from javascript or jquery.
            Asked
            
        
        
            Active
            
        
            Viewed 78 times
        
    0
            
            
         
    
    
        bliveinhack
        
- 40
- 1
- 8
1 Answers
0
            
            
        Have a look here.
In your case:
var href = window.location.href;
window.alert(href.substr(href.lastIndexOf('/') + 1));
 
    
    
        Community
        
- 1
- 1
 
    
    
        Mathijs Flietstra
        
- 12,900
- 3
- 38
- 67
- 
                    oops...i search it since 1 hour but didn't find...so ..by the way Thanks. – bliveinhack Apr 14 '13 at 06:34
- 
                    Google is your friend.. [http://www.google.com.au/search?q=get+last+part+of+url+javascript](http://www.google.com.au/search?q=get+last+part+of+url+javascript) – Mathijs Flietstra Apr 14 '13 at 06:37