I have a normal html site, it defines a variable called myVar. This is the declaration:
var myVar = something_that_is_set_dynamically;
Now I have a js file and I need to get the value of myVar in that file. How would I do that?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Make sure you have added the javascript file after you have declared your
myVar.For instance: