0
link = link.replace("/0/g", pos);

The link is "/PageEditor/Edit/10/0", and pos is 487. Replace function doesnt work for this.

1 Answer 1

2

Remove the quotes for a regular expression literal :

link = link.replace(/0/g, pos);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.