I have a url which could be `www.website.com/order/?pg3=2`
or `www.website.com/orderstatus/?pg2=` 

There could be several combinations and numbers at the end, all i want to really do is check is pg2 or pg3 are empty?

Im not sure how to actually access the post variables in the url, sometimes the url might not have the variables at all tho ?

```
$(document).ready(function () {

  if(pg2 != ''){
    //Does a click
    $("#add2").click();
  }
  if(p3 != ''){
    $("#add3").click();
  }

});

```

how do i check if the pg2 is empty in javascript on the page load?