I have declared a global variable in script1,js
This question already has an answer here:
You should capsule your code in each file, so you don´t pollute your windows object. Also, you can use "return" to get values from the other file, if needed.
链接地址: http://www.djcxy.com/p/17058.html