废话不多说,直接上代码
<script>
var s_keySearch = {
key_name:Array(),
key_index:Array(),
key_count:Array(),
key_scount:Array()
};
for(i=0;i<3;i++){
;
s_keySearch.key_name[i]="内衣"+i;
s_keySearch.key_index[i]= i;
s_keySearch.key_count[i]= i*100;
s_keySearch.key_scount[i]=i*10;
}
for(i=0;i<3;i++){
alert(s_keySearch.key_name[i]+"-"+s_keySearch.key_index[i]+"-"+s_keySearch.key_count[i]+"-"+s_keySearch.key_scount[i]);
}
</script>
JS自定义结构体数组
时间: 2024-10-10 13:50:40