Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Administrator
m4lab_landing_page
Commits
0581c63c
Commit
0581c63c
authored
Oct 13, 2021
by
Rosanny Sihombing
Browse files
add a new function
parent
d4d26c12
Changes
1
Hide whitespace changes
Inline
Side-by-side
js/generalFunction.js
View file @
0581c63c
...
@@ -6,4 +6,15 @@ function checkPasswordReq(pwd) {
...
@@ -6,4 +6,15 @@ function checkPasswordReq(pwd) {
isBest
=
true
;
isBest
=
true
;
}
}
return
isBest
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment