I am trying to get a url value using javascript, so far I can only get pure numbers, not mixed numbers with letters or just letters. I can\'t find any working examples of a
Your code looks like it should work I use the function below if it helps
function getParam(name){
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^]*)";
var regex = new RegExp( regexS );
var results = regex.exec (window.location.href);
if (results == null)
return "";
else
return results[1];
}
var first = getParam("test");