diff --git a/js/generalFunction.js b/js/generalFunction.js
index 5aeafdcc39c439733b511c73af61cef5eeffe87b..4a101d27bfcc99f5656354554e91f7e657c5128b 100644
--- a/js/generalFunction.js
+++ b/js/generalFunction.js
@@ -6,4 +6,15 @@ function checkPasswordReq(pwd) {
         isBest = true;
     }
     return isBest
+}
+
+// to get the queries of the URL
+function getQueryStringParams(params, url) {
+    // first decode URL to get readable data
+    var href = decodeURIComponent(url || window.location.href);
+    // regular expression to get value
+    var regEx = new RegExp('[?&]' + params + '=([^&#]*)', 'i');
+    var value = regEx.exec(href);
+    // return the value if exist
+    return value ? value[1] : null;
 }
\ No newline at end of file