 |
|
|  |
|
 |
15년 전 |
<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 |
|
추천 : 587 |
추천
목록
|
|
|  |
|