1. There is a data.js file that defines only one variable var project= {}
2.a.html reference data.js < script src= ".. / js/data.js" > < / script >. There is a function in a.html that gets the return value from the server and assigns it to the variable project
browse:function (pro) {
project=pro;//a.htmlporjectdata.jsproject
console.log(pro);
console.log(project);
window.open("test.html");
},
console print, pro,project, has value and is equal.
3.test.html also refers to data.js < script src= ".. / js/data.js" > < / script >, but jumping to test.html,test.html print project is empty in a.html. How to solve this problem?