개발/javascript & jquery
[javascript/function] 자바스크립트 html 색상표 랜덤 생성 방법
효벨
2023. 12. 12. 01:00
728x90
반응형
[javascript/function] 자바스크립트 html 색상표 랜덤 생성 방법
javascript 에서
html 색상코드를 랜던으로 설정해야 하는 경우가 종종 있습니다!
그럴때는 아래 함수를 활용하시면 됩니다!
참고들 하세요!
function make_color_code() {
var color = Math.floor(Math.random()*16777215).toString(16);
return "#"+color;
}
반응형