Title: Specify some variables in one document to affect other
Tags: javascript;jquery
Question: I have a script what write some texts, and I don't want the user open this long script just for change some texts.
For this, I want to put some variables in my index.html document to affect changes in my javascript document.
Example:
// index.html
<script type="text/javascript"&gt;
var name = "put here your name"; // Your name.
</script&gt;
I want to receive the content of the variable name in my .js script.
How i do that?
Thanks :)


Here is another answer: In JavaScript variables are generally assigned globally to the windows property. Therefore, you can access name in another document just by typing name.
Example: http://plnkr.co/edit/NsBPPe5SYIoYRwO9SfHE
Comment for this answer: Hm, thanks for the help, but is not that what i need. What i need is pass the variable in index.html to the script.js, not otherwise.
Comment for this answer: Hm, you have seen that plugins if we can edit some properties like this:
$('#slider').nivoSlider({
effect: 'random',               // Specify sets like: 'fold,fade,sliceDown'
slices: 15,
Comment for this answer: I got you wrong. I don't quite understand which file should do what.

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2014:00:03/01/14', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<javascript><jquery>', 'Title': 'Specify some variables in one document to affect other', 'ViewCount': 24, 'id': 22120741, 'user_AboutMe': None, 'user_AccountId': 2473231.0, 'user_DisplayName': 'user2154508', 'user_Reputation': 335.0, 'user_Views': 96.0, 'user_id': 2154508.0}}