웹사이트 관련 팁들을 모아놓은 곳입니다. 좋은팁 공유 합시다.
  • 웹미니 한줄 전광판 영역 입니다.
글 수 186

14

조회 수 : 2713 신고 : 0

profile
작성자 : title: [ani]깜빡이는 표정빽짱구
포인트 : 56933 | 레벨 : 25
미리보기 <==클릭


네스케이프 사용자분들은 로딩이 오래되면 stop을 누르세요.


<HTML>
<HEAD>
<TITLE>색깔보기</TITLE>
</HEAD>
<BODY bgcolor="white" text="black" link="blue" vlink="purple" alink="red">

<P><HR size="1" noshade><SCRIPT language="JavaScript">
<!--

// create 6-element array

var hex = new Array(6)

// assign non-dithered descriptors

hex[0] = "FF"

hex[1] = "CC"

hex[2] = "99"

hex[3] = "66"

hex[4] = "33"

hex[5] = "00"

// accept triplet string and display as background color

function display(triplet) {

// set color as background color

document.bgColor = '#' + triplet

// display the color hexadecimal triplet

alert('Background color is now ' + triplet)

}

// draw a single table cell based on all descriptors

function drawCell(red, green, blue) {

// open cell with specified hexadecimal triplet background color

document.write('<TD BGCOLOR="#' + red + green + blue + '">')

// open a hypertext link with javascript: scheme to call display function

document.write('<A HREF="javascript:display('' + (red + green + blue) + '')">')

// print transparent image (use any height and width)

document.write('<IMG SRC="../img/place.gif" BORDER=0 HEIGHT=12 WIDTH=12>')

// close link tag

document.write('</A>')

// close table cell

document.write('</TD>')

}

// draw table row based on red and blue descriptors

function drawRow(red, blue) {

// open table row

document.write('<TR>')

// loop through all non-dithered color descripters as green hex

for (var i = 0; i < 6; ++i) {

drawCell(red, hex[i], blue)

}

// close current table row

document.write('</TR>')

}

// draw table for one of six color cube panels

function drawTable(blue) {

// open table (one of six cube panels)

document.write('<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>')

// loop through all non-dithered color descripters as red hex

for (var i = 0; i < 6; ++i) {

drawRow(hex[i], blue)

}

// close current table

document.write('</TABLE>')

}

// draw all cube panels inside table cells

function drawCube() {

// open table

document.write('<TABLE CELLPADDING=5 CELLSPACING=0 BORDER=1><TR>')

// loop through all non-dithered color descripters as blue hex

for (var i = 0; i < 6; ++i) {

// open table cell with white background color

document.write('<TD BGCOLOR="#FFFFFF">')

// call function to create cube panel with hex[i] blue hex

drawTable(hex[i])

// close current table cell

document.write('</TD>')

}

// close table row and table

document.write('</TR></TABLE>')

}

// call function to begin execution

drawCube()

// -->

</SCRIPT>
</body>
</HTML>

profile 글쓴이 빽짱구

단점이 없는 사람은 장점도 거의 없다 - 에이브러햄 링컨

엮인글 :
https://web.webmini.net/webtip/14005/98c/trackback
소중한 댓글 부탁드립니다.
추천수 10단위당 메달이 1개씩 노출되고, 추천수에 따라 배경색이 변하며, 일정수의 추천수를 받을시 BEST 아이콘이 붙게됩니다.
추천수에 따른 배경색 보기 본문으로 바로가기
  • 추천수 50개이상
  • 추천수 30개이상
  • 추천수 20개이상
  • 추천수 10개이상
  • 추천수 3개이상
닫기

댓글 '2'

괴물물고기 (103451)

2009.09.22 18:49:19

미리보기 엑박 뜨네요 ㅠ_ㅠ
profile
title: [ani]깜빡이는 표정빽짱구 (103472)

2009.09.22 19:58:03

작성자

이게시물 올린날짜가.. 좀되었네요.. 그간 셀수없이 계정을 옮겨서 유실된 모양입니다.

List of Articles
번호 제목 글쓴이 날짜 추천 수 조회 수sort
66 방문객의 해상도를 자신의 홈에 맞게 바꾸기 [1] title: [ani]깜빡이는 표정빽짱구 2004-10-18 12 2889
65 글자위에 마우스 올리면 글자 진하게 하기 title: [ani]깜빡이는 표정빽짱구 2004-03-08 12 2882
64 best of best Html 이란 무엇인가 [2] title: [ani]깜빡이는 표정빽짱구 2004-02-08 23 2865
63 ssl 보안인증서가 설치 잘되어있는지 확인하는곳 file [1] title: [ani]깜빡이는 표정빽짱구 2012-08-16   2842
62 소스보여주기 title: [ani]깜빡이는 표정빽짱구 2004-07-12 12 2840
61 로그인이 안될때~ [2] title: [ani]깜빡이는 표정빽짱구 2004-02-09 11 2776
60 best of best 타겟(target) 이란? [1] title: [ani]깜빡이는 표정빽짱구 2004-07-09 20 2721
59 아이프레임시 뒷배경 투명처리및 불투명처리 [1] title: [ani]깜빡이는 표정빽짱구 2004-02-28 10 2714
58 색깔 보기 [2] title: [ani]깜빡이는 표정빽짱구 2004-07-12 14 2713
57 인터넷 서핑속도 올는방법 (펌) [1] Spona 2004-09-02 19 2709
56 글자 마퀴스톱! title: [ani]깜빡이는 표정빽짱구 2004-02-29 12 2696
55 버튼만들기 (다른이름으로 저장) title: [ani]깜빡이는 표정빽짱구 2004-04-18 11 2672
54 best of best copyright 자동으로 날짜 업데이트 title: [ani]깜빡이는 표정빽짱구 2004-08-19 27 2668
53 이쁜 올라오는 글자 [2] title: [ani]깜빡이는 표정빽짱구 2004-02-07 11 2640
52 윈도우 단축키 [2] title: [ani]깜빡이는 표정빽짱구 2004-02-10 15 2638
51 웹디자이너가 되기위한 기본이론 [1] title: [ani]깜빡이는 표정빽짱구 2004-04-20 13 2634
50 PHP만 지원되도 제로보드를 설치할수있다 [2] title: [ani]깜빡이는 표정빽짱구 2004-02-07 13 2630
49 상태표시줄 바꿔보자3 [2] title: [ani]깜빡이는 표정빽짱구 2004-02-07 13 2628
48 움직이는 알림장 [1] title: [ani]깜빡이는 표정빽짱구 2004-08-06 17 2607
47 홈페이지란 무엇인가? [1] title: [ani]깜빡이는 표정빽짱구 2004-02-08 17 2606