|
alert shows temparray [0], it should show //2016122909584262.jpg, how to execute eval's code,
var index = document.getElementById ("itemno"). selectedIndex;
var temparray = new Array ();
temparray.push ("// 2016122909584262.jpg");
temparray.push ("// 20161214113441953.jpg");
temparray.push ("");
eval ("alert ('temparray [" + index + "]')"); |
|