Javascript Array °´Ã¼ È°¿ë |
|
|
 |
14³â Àü |
<script type="text/javascript">
function Obj1(text1, text2){
this.text1 = text1;
this.text2 = text2;
}
var list = new Array();
list[0] = new Obj1('»ç°ú','apple');
list[1] = new Obj1('º¹¼þ¾Æ','peach');
list[2] = new Obj1('¼ö¹Ú','watermelon');
for(i=0;i<list.length;i++){
document.write(list[i].text1 + " / " + list[i].text2 + '<BR>');
}
list[1].text1 = 'µþ±â';
list[1].text2 = 'strawberry';
for(i=0;i<list.length;i++){
document.write(list[i].text1 + " / " + list[i].text2 + '<BR>');
}
</script>
Ãâ·Â
»ç°ú / apple
º¹¼þ¾Æ / peach
¼ö¹Ú / watermelon
»ç°ú / apple
µþ±â / strawberry
¼ö¹Ú / watermelon |
|
̵̧ : 452 |
̵̧
¸ñ·Ï
|
|