I’m working on a script that requires I get a variable so we goto the right location on the site.
I want to do something like:
<script type="text/javascript" src="dir/script.js?x=103"></script>
But how would I get that?
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.
Assuming you know the filename of the script within the script itself, search all
<script>tags for the one that contains the relevant filename in itssrcattribute. Thensplitit on?and read the value.