javascript - Parse query string into parameter names and values -


i have query string:

isuser=0&tokenid=911b7ce6-0ddb-4739-9a02-cd7304a2w&emid=19&url=dfsjgh&roll=s&commid=0 

i parse , end follows:

var firstcharector=0; var secondcharector=911b7ce6-0ddb-4739-9a02-cd7304a2w; var thirdcharector=19; 

how can achieve this?

java code

giving java code because of 'java','jsp' tag in question

string partialurl; // url in post partial string urlarray[] = string.split("&");  string temparray[] = new string[2];  // expected /* urlarray[0] = "isuser=0" urlarray[1] = "tokenid=911b7ce6-0ddb-4739-9a02-cd7304a2w" urlarray[2] = "emid=19" */  for(int i=0;i<urlarray.length;i++) {    temparray = urlarray[i].split("=");    urlarray[i] = temparray[1]; // after '=' sign } 

javascript : no idea


Comments

Popular posts from this blog

c++ - Linked List error when inserting for the last time -

java - activate/deactivate sonar maven plugin by profile? -

java - What is the difference between String. and String.this. ? -