we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "jquery get search parameter"
Elicia
11 Nov 2020
1$.urlParam = function (name) {
2    var results = new RegExp('[\?&]' + name + '=([^&#]*)')
3                      .exec(window.location.search);
4
5    return (results !== null) ? results[1] || 0 : false;
6}
7
8console.log($.urlParam('action')); //edit
9