Assume the url is "http://localhost:portnumber/site/pages/page.aspx?Id=1
javascript function:
function getQueryProjectNum(variable)
{
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++)
{
var pair = vars[i].split("=");
if (pair[0] == variable)
{
return pair[1];
}
}
}
var Id= getQueryProjectNum("Id");
1 comment:
Thanks for your advices. It will be sure helpful to set these values. I have bookmarked your site to transmit it to my colleagues.
Post a Comment