<html>
<head>
<style type="text/css">
#con { background:skyblue; width:200px; height:200px; }
</style>
<script>
var array=["aaa","bbb","ccc"];
function a(){
for(i=0;i<3;i++){
con.innerHTML+=array[i];
}
}
</script>
</head>
<body>
<input type="button" onclick="a()">
<div id="con"></div>
</body>
</html>
'개발하자 > 자바스크립트' 카테고리의 다른 글
단입력받아서 구구단 출력-prompt,isNaN (0) | 2015.02.12 |
---|---|
문자형에서 정수형으로 자료형 변환(parseInt) (0) | 2015.02.12 |
테이블에 구구단출력 (0) | 2015.02.10 |
input type (0) | 2015.02.10 |
top,blank,self (0) | 2015.02.10 |