Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- docker
- install
- TPL
- 한글 깨짐
- smarty
- 천단위
- TextBox
- MySQL
- 확장자
- 부모창
- SVN
- replace
- 일괄변경
- Eclipse
- Oracle
- i18n
- yum
- Python
- JavaScript
- centos
- RabbitMQ
- Selectbox
- jQuery
- 문자열자르기
- Postfix
- php
- ubuntu
- random
- mariadb
Archives
- Today
- Total
목록random (2)
wilson's story
[JAVASCRIPT] 랜덤 뽑아오기
var result = Math.floor(Math.random() * 10) + 1; document.write(result); Math.floor(Math.random() * 100) + 1; //이렇게 하면, 1에서 100까지 나옴 Math.floor(Math.random() * 10); //이렇게 하면, 0에서 9까지 나옴 // Math.floor() 대신 Math.round()를 사용하여 정수화하면 안된다 // Math.round()를 사용하면 1~10까지 나오는 것이 아니라 1~11까지 나오게 됩니다.
Javascript
2009. 11. 6. 19:23