Jump to content

Getting Requested Variable Value


sairfan1
 Share

Recommended Posts

get the url pathname:var path = window.location.pathname;split the path on the assignment operator:var assOp = path.split('=');Write the last value:document.write(assOp.length-1); //Or Get the second value: document.write(assOp[1]);

Edited by roundcorners
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...