Created
December 16, 2019 11:03
-
-
Save mhmohon/1ea28b4a8df84b97fed0268a17e490f4 to your computer and use it in GitHub Desktop.
Get url prams
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//URLSearchParams() JQuery built in function. | |
// e.g. http://127.0.0.1:8000/account?option=user_registration | |
//window.location.search will get search keyword. (?option=user_registration) | |
let searchParams = new URLSearchParams(window.location.search); | |
if(searchParams.has('option')) | |
{ | |
let param = searchParams.get('option'); | |
if(param == 'user_registration') | |
{ | |
if($("#edit").length != 0) | |
{ | |
$('#edit').click(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment