유지보수 오래하기

2 views
Skip to first unread message

베시시

unread,
Aug 5, 2011, 6:01:06 AM8/5/11
to IBKSYSTEM
<html>
<head>
<title>유지보수 오래하기 </title>
<script type="text/javascript">
<!--
function 랜덤숫자(){
var 갯수 = parseInt(Math.random() * 47);
if( 갯수 < 1 || 갯수 > 45) return 랜덤숫자();
else return 갯수;
}
function 숫자검사(몇개){
var 갯수 = new Array();
var 결과값="";
var 임시숫자, 팔라딘=0;

while(갯수.length < 몇개){
임시숫자 = 랜덤숫자();
for(팔라딘=0;팔라딘<갯수.length; 팔라딘++){ if(갯수[팔라딘] == 임시숫자)
break; }
if(팔라딘 == 갯수.length){
갯수[팔라딘] = 임시숫자;
결과값 += 임시숫자 + " ";
}
}
return 결과값;
}
function 온로드(){
var 리털발 = 숫자검사(6);
document.getElementById("발로써").innerText = 리털발;
}

//-->
</script>

</head>
<body>
<button type="button" onclick = '온로드();'>시작</button>

<br><br>
<span id='발로써'></span>
</body>
</html>

Reply all
Reply to author
Forward
0 new messages