4

i just want to know if its possible to retrrive param from js calling with passed values like this

myfile.js?my_parm=brol

My goal is to retrieve the my_param value from within my "myfile.js"

Thanks in advance

1

2 Answers 2

1

See Calling URL parameters within a .js file

Sign up to request clarification or add additional context in comments.

Comments

0

No, not from within the JavaScript, the only way to access query string parameters in JavaScript is through the document or location objects. Those are only available when the script is executed within the browser.

If you are trying to access it using a templating language (like php or python) you could of course capture the querystring argument and inject information into the JavaScript code with that.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.