O
O
other_letter2016-10-19 15:34:04
JavaScript
other_letter, 2016-10-19 15:34:04

How to use regexps in javascript?

There is a url like "site1.com/img/pic1.jpg$param=blablabla"
You need to redirect to "site2.com/img/pic1.jpg"
Tell me what else url = url.replace('site1.com', 'site2.com');you need?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton fon Faust, 2016-10-19
@bubandos

Read about window.location.
here, for example: javascript.ru/window-location

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question