Get Request variable with Javascript
  • This function below will get a request variable value with Javascript.It is simlilar to Request["x"] with C#  or $_Request in php.

    function Re(variable)
           var query =;
           var vars = query.split("&");
           for (var i=0;i<vars.length;i++) {
                   var pair = vars[i].split("=");
                   if(pair[0] == variable){return pair[1];}

  • 3 Comments sorted by
  • To call it ,you said Re("city")
  • You are welcome @ramesh
    To call it ,you said Re("city")

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook


Popular Posts of the Week