0

I want to change the following url:

`http://en.savefrom.net/#url=https://www.youtube.com/watch?v=xxxxxx` 

into

`http://www.website.my/p/test.html?id=https://www.youtube.com/watch?v=xxxxxx` 

Is there a JavaScript or Jquery solution for this?

1 Answer 1

2

If it will always be these exact patterns, you can write:

var newUrl = 'http://www.website.my/p/test.html?id=' + oldUrl.split('#url=')[1]; 

Here's the Fiddle.

Sign up to request clarification or add additional context in comments.

1 Comment

how to apply? Can you make it in jsfiddle.net

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.