I want to get value (TEXT) from URL to input from.
Example:
domain.com/page?code=123abc
I need to get 123abc paste automatically on input form with (code) id or name.
How I can do it with JS.
Thank you.
Need to use JavaScript
I want to get value (TEXT) from URL to input from.
Example:
domain.com/page?code=123abc
I need to get 123abc paste automatically on input form with (code) id or name.
How I can do it with JS.
Thank you.
Need to use JavaScript
See URLSearchParams
const urlParams = new URLSearchParams(window.location.search);
const myParam = urlParams.get('myParam');
then set as .value
of the input.