Split url with javascript -


I am trying to split the following url:

To get only

I am using javascript window.location.href and partition, but not yet success. How can this be done? Thanks

try it

  var fullurl = "http: // Www.store.com/products.aspx/Books/The-happy-donkey ", url = fullurl.split (" .aspx ") [0] +" .aspx ";    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

jsp - Google line chart x-axis shrinks on transition -

java - Reaching JTextField in a DocumentListener -