//function getParameterByName(name) { // name = name.replace(/[[]/, "\\\[").replace(/[\]]/, "\\\]"); // var regexS = "[\\?&]" + name + "=([^�]*)"; // var regex = new RegExp(regexS); // var results = regex.exec(window.location.search); // if (results == null) { // return ""; // } // else { // return decodeURIComponent(results[1].replace(/\+/g, " ")); // } //}
function getParameterByName(name) { var results = RegExp('[?&]' + name + '=([^&]*)') .exec(window.location.search); return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null; }
"/books"
var newURL = origURL.replace('/books','');
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)