Use Jquery to remove first URL in a double URL link -


i trying remove first url in double url link such as:

http://somewebsite.com/something/#/###/#/http://someotherwebsite.com/

after page loads. afterwards, like:

http://someotherwebsite.com/

where # = numbers

sometimes first website .org or.net. tried searching , tried ideas never remove first full link.

it's not pretty, @ least on correct track:

links = 'http://somewebsite.com/something/#/###/#/http://someotherwebsite.com/' links = links.split('http') console.log(links[2]) 

that give second link (removing 'http', there can add on , need. it's not pretty, doesn't sound looking elegant solution

if want know more split() function, splits (hence name) string based on input (the 'http' in our case). there can traverse through or whatever want list.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -