Getting value from a querystring

Getting value from a querystring

I need to check for a querystring value and then display a certain element based on that. I thought I cannot directly get it from jQuery code. So I created a hidden input box. Got the querystring value in it in the page load, then tried something like:
  1.         if (hval_crevent.attr('value') = '1')
  2.         {
  3.             tab_crevents.show();
  4.         }
But it doesn't work.
How can I achieve this?
Thanks.