代码如下:
  <script>
 function productClass(){
var prod_name = null;
var prod_id = null;
var is_group = null;
var is_base = null;
var priceList = null;
var spList = null;
} var prod2 = new  productClass();
  prod2.prod_name = "111";
  alert(prod2.prod_name);
  alert(("prod"+2).prod_name);
</script>为什么 alert(("prod"+2).prod_name); 不可以,我是根据数字来找对象的,请问该怎么写啊?alert($('prod'+i));也不可以的