By using document.referrer we will get all the reference of URL in JavaScript, such as the following:
http://localhost/testwordpress/wp-admin/admin.php?page=thesis-options&upgraded=true
From this output how can we extract the query string part only:
?page=thesis-options&upgraded=true
Is there any method in JavaScript?
If you are just looking to get the values from the query string I use the following function:
Simply pass in the key you are looking for and get the value back.
IE: getQueryString(‘upgraded’) would return true