I have to split values from href link.
my href link as follows
var val =location.href      // outputs http://localhost:8080/index.html?username=test@gmail.com&joid=68
i want to get username value and joid value separately.
I tried following but not working
var emailrogh= val.split("&");
email=emailrogh[0];
var idrough=emailrogh[1].split("=");
var id=idrough[1];
how can i extract test@gmail.com and 68
 
     
     
     
     
     
     
     
     
    