I have many JS object literal files in my code. In a JS function
data=data9.webb9[i];
I am accesin开发者_StackOverflow社区g it in this way with help of
script type="text/javascript" src="webdata"> script
in head tag
How could I
do something like this:
data=file[i];
where file=data9.web9 or data10.web10 and so on... according to function call.
switch( SomeFunction() )
{
case 1:
file = data9.web9;
break;
case 2:
file = data10web10;
break;
default:
file = data.web;
}
data = file[i]; //file=data9.web9 or data10.web10 and so on... according to function call.
精彩评论