0

I've got this function:

$.urlParam = function(name){
            var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
            if (results==null){
                return null;
            }
            else{
                return results[1] || 0;
            }
        };

Fiddle

I put a ?param1 behind the URL but nothing is showing up, the firebug console doesn't say anything.

Can you guys help me?

Pete
  • 57,112
  • 28
  • 117
  • 166
Lydia Maier
  • 439
  • 2
  • 12

0 Answers0