Search and Don’t Replace

John Resig has an interesting hack on his website today for rewriting url query parameters in JavaScript. The interesting part of John’s solution is using JavaScript’s replace function to search a string and then perform an operation other than replace. Nice trick to know about.

0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment