Capture querystring value in Javascript

Madhu.b.rokkam
Posted by Madhu.b.rokkam under JavaScript category on | Points: 40 | Views : 2686
if the url is
http://localhost:1033/Default.htm?ValueFromAspx=test

var str = document.location.search.substring(1);
alert(str);

this will result as

ValueFromAspx=test

Comments or Responses

Login to post response