sairfan1 Posted February 22, 2010 Share Posted February 22, 2010 Hi my explorer have this address in address bar www.example.com?first=12&second=13using java script how can i get value of second variable.thanks Link to comment Share on other sites More sharing options...
roundcorners Posted February 22, 2010 Share Posted February 22, 2010 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]); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.