검색결과 리스트
유용한.../쏘오쓰들 에 해당되는 글 11건
- 2007.06.28 사이트 배경에 날아다니는 별 배경을 만들어보자꾼!!
- 2007.06.28 움직이는 텍스트 - 아스키 애니메이션 가능..호...ㅡㅡa
- 2007.06.28 색상값 찾기
2007. 6. 28. 13:02
<script language=JavaScript>
<!--
cOlOuRs=new Array("abbbff","ffffee","ffff7a","dffffd","ffaaa0","ffddd0")
S_amount = 30;
L_amount = 15;
S_Ypos = new Array();
S_Ypos = S_Ypos;
S_Xpos = new Array();
L_Ypos = new Array();
L_Xpos = new Array();
S_speed= new Array();
L_speed= new Array();
if (document.all){
for (i = 0; i < S_amount; i++){
S_Ypos[i] = Math.round(Math.random()*document.body.offsetHeight);
S_Xpos[i] = Math.round(Math.random()*document.body.offsetWidth);
}
for (i = 0; i < L_amount; i++){
L_Ypos[i] = Math.round(Math.random()*document.body.offsetHeight);
L_Xpos[i] = Math.round(Math.random()*document.body.offsetWidth);
}
document.write('<div id="Outer" style="position:absolute;top:0px;left:0px">');
document.write('<div id="Inner" style="position:relative">');
for (i = 0; i < S_amount; i++){
document.write('<div id="ieS_star" style="position:absolute;top:'+S_Ypos[i]+';left:'+S_Xpos[i]+';width:1px;height:1px;background:#fffff0;font-size:2px"></div>');
}
for (i = 0; i < L_amount; i++){
document.write('<div id="ieL_star" style="position:absolute;top:'+L_Ypos[i]+';left:'+L_Xpos[i]+';width:2px;height:2px;background:#ffffff;font-size:3px"></div>');
}
document.write('</div>');
document.write('</div>');
for (i = 0; i < L_amount; i++){
for (j = 0; j < cOlOuRs.length; j++){
var NewColour=Math.round(Math.random()*[j])
}
document.all.ieS_star[i].style.background=cOlOuRs[NewColour];
document.all.ieL_star[i].style.background=cOlOuRs[NewColour];
}
for (i=0; i < ieS_star.length; i++){S_speed[i]=Math.random()*3+1}
for (i=0; i < ieL_star.length; i++){L_speed[i]=Math.random()*7+2}
function ES_go(){
document.all.Outer.style.pixelTop=document.body.scrollTop;
for (i=0; i < ieS_star.length; i++){
ieS_star[i].style.pixelLeft-=S_speed[i];
if (ieS_star[i].style.pixelLeft < -10){ieS_star[i].style.pixelLeft=window.document.body.offsetWidth}
}
S_timer=setTimeout('ES_go()',30);
}
function EL_go(){
for (i=0; i < ieL_star.length; i++){
ieL_star[i].style.pixelLeft-=L_speed[i];
if (ieL_star[i].style.pixelLeft -10){ieL_star[i].style.pixelLeft=window.document.body.offsetWidth}
}
L_timer=setTimeout('EL_go()',10);
}
function IeStart(){
ES_go();
EL_go();
}
IeStart();
}
else if (document.layers){
for (i = 0; i < S_amount; i++){
S_Ypos[i] = Math.round(Math.random()*window.innerHeight);
S_Xpos[i] = Math.round(Math.random()*window.innerWidth);
document.write("<LAYER NAME='S_star"+i+"' LEFT=0 TOP=0 BGCOLOR='#FFFFF0' CLIP='0,0,1,1'></LAYER>");
document.layers["S_star"+i].top = S_Ypos[i];
document.layers["S_star"+i].left = S_Xpos[i];
}
for (i = 0; i < L_amount; i++){
L_Ypos[i] = Math.round(Math.random()*window.innerHeight);
L_Xpos[i] = Math.round(Math.random()*window.innerWidth);
document.write("<LAYER NAME='L_star"+i+"' LEFT=0 TOP=0 BGCOLOR='#FFFFF0' CLIP='0,0,2,2'></LAYER>");
document.layers["L_star"+i].top = L_Ypos[i];
document.layers["L_star"+i].left = L_Xpos[i];
for (j = 0; j < cOlOuRs.length; j++){
var NewColour=Math.round(Math.random()*[j]);
}
document.layers['S_star'+i].bgColor=cOlOuRs[NewColour];
document.layers['L_star'+i].bgColor=cOlOuRs[NewColour];
}
for (i=0; i < S_amount; i++){S_speed[i]=Math.random()*3+1}
for (i=0; i < L_amount; i++){L_speed[i]=Math.random()*7+2}
function NS_go(){
for (i=0; i < S_amount; i++){
var temp="S_star"+i;//50
document.layers[temp].top=S_Ypos[i]+window.pageYOffset;
document.layers['S_star'+i].left-=S_speed[i];
if (document.layers['S_star'+i].left < -10){document.layers['S_star'+i].left=window.innerWidth}
}
S_timer=setTimeout('NS_go()',30);
}
function NL_go(){
for (i=0; i < L_amount; i++){
var temp="L_star"+i
document.layers[temp].top=L_Ypos[i]+window.pageYOffset;
document.layers['L_star'+i].left-=L_speed[i];
if (document.layers['L_star'+i].left < -10){document.layers['L_star'+i].left=window.innerWidth}
}
L_timer=setTimeout('NL_go()',10);
}
function NsStart(){
NS_go();
NL_go();
}
NsStart();
}
window.onresize = new Function("window.location.reload()");
//-->
</script>
<!--
cOlOuRs=new Array("abbbff","ffffee","ffff7a","dffffd","ffaaa0","ffddd0")
S_amount = 30;
L_amount = 15;
S_Ypos = new Array();
S_Ypos = S_Ypos;
S_Xpos = new Array();
L_Ypos = new Array();
L_Xpos = new Array();
S_speed= new Array();
L_speed= new Array();
if (document.all){
for (i = 0; i < S_amount; i++){
S_Ypos[i] = Math.round(Math.random()*document.body.offsetHeight);
S_Xpos[i] = Math.round(Math.random()*document.body.offsetWidth);
}
for (i = 0; i < L_amount; i++){
L_Ypos[i] = Math.round(Math.random()*document.body.offsetHeight);
L_Xpos[i] = Math.round(Math.random()*document.body.offsetWidth);
}
document.write('<div id="Outer" style="position:absolute;top:0px;left:0px">');
document.write('<div id="Inner" style="position:relative">');
for (i = 0; i < S_amount; i++){
document.write('<div id="ieS_star" style="position:absolute;top:'+S_Ypos[i]+';left:'+S_Xpos[i]+';width:1px;height:1px;background:#fffff0;font-size:2px"></div>');
}
for (i = 0; i < L_amount; i++){
document.write('<div id="ieL_star" style="position:absolute;top:'+L_Ypos[i]+';left:'+L_Xpos[i]+';width:2px;height:2px;background:#ffffff;font-size:3px"></div>');
}
document.write('</div>');
document.write('</div>');
for (i = 0; i < L_amount; i++){
for (j = 0; j < cOlOuRs.length; j++){
var NewColour=Math.round(Math.random()*[j])
}
document.all.ieS_star[i].style.background=cOlOuRs[NewColour];
document.all.ieL_star[i].style.background=cOlOuRs[NewColour];
}
for (i=0; i < ieS_star.length; i++){S_speed[i]=Math.random()*3+1}
for (i=0; i < ieL_star.length; i++){L_speed[i]=Math.random()*7+2}
function ES_go(){
document.all.Outer.style.pixelTop=document.body.scrollTop;
for (i=0; i < ieS_star.length; i++){
ieS_star[i].style.pixelLeft-=S_speed[i];
if (ieS_star[i].style.pixelLeft < -10){ieS_star[i].style.pixelLeft=window.document.body.offsetWidth}
}
S_timer=setTimeout('ES_go()',30);
}
function EL_go(){
for (i=0; i < ieL_star.length; i++){
ieL_star[i].style.pixelLeft-=L_speed[i];
if (ieL_star[i].style.pixelLeft -10){ieL_star[i].style.pixelLeft=window.document.body.offsetWidth}
}
L_timer=setTimeout('EL_go()',10);
}
function IeStart(){
ES_go();
EL_go();
}
IeStart();
}
else if (document.layers){
for (i = 0; i < S_amount; i++){
S_Ypos[i] = Math.round(Math.random()*window.innerHeight);
S_Xpos[i] = Math.round(Math.random()*window.innerWidth);
document.write("<LAYER NAME='S_star"+i+"' LEFT=0 TOP=0 BGCOLOR='#FFFFF0' CLIP='0,0,1,1'></LAYER>");
document.layers["S_star"+i].top = S_Ypos[i];
document.layers["S_star"+i].left = S_Xpos[i];
}
for (i = 0; i < L_amount; i++){
L_Ypos[i] = Math.round(Math.random()*window.innerHeight);
L_Xpos[i] = Math.round(Math.random()*window.innerWidth);
document.write("<LAYER NAME='L_star"+i+"' LEFT=0 TOP=0 BGCOLOR='#FFFFF0' CLIP='0,0,2,2'></LAYER>");
document.layers["L_star"+i].top = L_Ypos[i];
document.layers["L_star"+i].left = L_Xpos[i];
for (j = 0; j < cOlOuRs.length; j++){
var NewColour=Math.round(Math.random()*[j]);
}
document.layers['S_star'+i].bgColor=cOlOuRs[NewColour];
document.layers['L_star'+i].bgColor=cOlOuRs[NewColour];
}
for (i=0; i < S_amount; i++){S_speed[i]=Math.random()*3+1}
for (i=0; i < L_amount; i++){L_speed[i]=Math.random()*7+2}
function NS_go(){
for (i=0; i < S_amount; i++){
var temp="S_star"+i;//50
document.layers[temp].top=S_Ypos[i]+window.pageYOffset;
document.layers['S_star'+i].left-=S_speed[i];
if (document.layers['S_star'+i].left < -10){document.layers['S_star'+i].left=window.innerWidth}
}
S_timer=setTimeout('NS_go()',30);
}
function NL_go(){
for (i=0; i < L_amount; i++){
var temp="L_star"+i
document.layers[temp].top=L_Ypos[i]+window.pageYOffset;
document.layers['L_star'+i].left-=L_speed[i];
if (document.layers['L_star'+i].left < -10){document.layers['L_star'+i].left=window.innerWidth}
}
L_timer=setTimeout('NL_go()',10);
}
function NsStart(){
NS_go();
NL_go();
}
NsStart();
}
window.onresize = new Function("window.location.reload()");
//-->
</script>
2007. 6. 28. 13:01
<input type=button value=START onclick=start_movie()>
<input type=button value=STOP onclick=stop_movie()>
<br><br>
<span id=movie_screen></span>
<script language=javascript>
var str="+_+/#+__+/#+___+/#+____+/#+_____-/#+_____+/#+_____-/#+____-a#+___-a#+__-a#+_-a#-_-a#-_-a#o_oa#o_oa#o_oa#o_oa#o_oa#o_oa#o_oa#o_oa#o_oa#o_oa";
str = str.split(/#/);
var i=0;
function start_movie()
{
if(i>=str.length)
{
i=0;
}
movie_screen.innerHTML=str[i];
i++;
playing=setTimeout("start_movie()", 100);
}
function stop_movie()
{
clearTimeout(playing);
}
</script>
<input type=button value=STOP onclick=stop_movie()>
<br><br>
<span id=movie_screen></span>
<script language=javascript>
var str="+_+/#+__+/#+___+/#+____+/#+_____-/#+_____+/#+_____-/#+____-a#+___-a#+__-a#+_-a#-_-a#-_-a#o_oa#o_oa#o_oa#o_oa#o_oa#o_oa#o_oa#o_oa#o_oa#o_oa";
str = str.split(/#/);
var i=0;
function start_movie()
{
if(i>=str.length)
{
i=0;
}
movie_screen.innerHTML=str[i];
i++;
playing=setTimeout("start_movie()", 100);
}
function stop_movie()
{
clearTimeout(playing);
}
</script>
2007. 6. 28. 13:00
아래문서를...메모장이나..드림위버나..뭐..하여간..
에디터등을 이용해서..htm파일로 만들어 실행시키면..언제든지 간단하게..원하는 색상값을 찾을수 있겠습니다...(누가 만들었는지..원..멋져)
<html>
<head>
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<SCRIPT LANGUAGE="JavaScript">
<!-- 만든 넘 : D10n (biab@iinet.net.au) -->
<!-- 그넘 홈 : http://www.iinet.net.au/~biab -->
<!-- 수정한 넘 : 윤면용 -->
<!-- 수정한 홈 : http://www.dhtmldot.com -->
<!-- 또수정한 넘 : 술도짱 -->
<!-- 또수정한 홈 : http://www.suldo.net -->
<!-- Begin
addary = new Array(); //red
addary[0] = new Array(0,1,0); //red green
addary[1] = new Array(-1,0,0); //green
addary[2] = new Array(0,0,1); //green blue
addary[3] = new Array(0,-1,0); //blue
addary[4] = new Array(1,0,0); //red blue
addary[5] = new Array(0,0,-1); //red
addary[6] = new Array(255,1,1);
clrary = new Array(360);
for(i = 0; i < 6; i++)
for(j = 0; j < 60; j++) {
clrary[60 * i + j] = new Array(3);
for(k = 0; k < 3; k++) {
clrary[60 * i + j][k] = addary[6][k];
addary[6][k] += (addary[i][k] * 4);
}
}
function capture() {
if(document.layers) {
layobj = document.layers['wheel'];
layobj.document.captureEvents(Event.MOUSEMOVE);
layobj.document.onmousemove = moved;
}
else {
layobj = document.all["wheel"];
layobj.onmousemove = moved;
}
}
function moved(e) {
y = 4 * ((document.layers)?e.layerX:event.offsetX);
x = 4 * ((document.layers)?e.layerY:event.offsetY);
sx = x - 512;
sy = y - 512;
qx = (sx < 0)?0:1;
qy = (sy < 0)?0:1;
q = 2 * qy + qx;
quad = new Array(-180,360,180,0);
xa = Math.abs(sx);
ya = Math.abs(sy);
d = ya * 45 / xa;
if(ya > xa) d = 90 - (xa * 45 / ya);
deg = Math.floor(Math.abs(quad[q] - d));
n = 0;
sx = Math.abs(x - 512);
sy = Math.abs(y - 512);
r = Math.sqrt((sx * sx) + (sy * sy));
if(x == 512 & y == 512) {
c = "000000";
}
else {
for(i = 0; i < 3; i++) {
r2 = clrary[deg][i] * r / 256;
if(r > 256) r2 += Math.floor(r - 256);
if(r2 > 255) r2 = 255;
n = 256 * n + Math.floor(r2);
}
c = n.toString(16);
while(c.length < 6) c = "0" + c;
}
if(document.layers) {
document.layers["wheel"].document.f.t.value = "#" + c;
// document.layers["wheel"].bgColor = "#" + c;
document.layers["rgbColor"].bgColor = "#" + c;
}
else {
document.all["wheel"].document.f.t.value = "#" + c;
// document.all["wheel"].style.backgroundColor = "#" + c;
document.all["rgbColor"].style.backgroundColor = "#" + c;
}
return false;
}
function changeColor() {
document.all["rgbColor"].style.backgroundColor = f.value;
}
//0=클립보드에 복사를 안합니다., 1=클립보드에 복사를합니다.
var copytoclip=1
function HighlightAll(theField) {
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
if (document.all&©toclip==1){
therange=tempval.createTextRange()
therange.execCommand("Copy")
window.status="색상코드를 복사 했습니다.!"
alert("색상코드를 복사 했습니다.!");
setTimeout("window.status=''",1800)
}
}
// End -->
</script>
<style type="text/css">
body{color:#000000; font-size: 9pt; background-color:#ffffff;}
.colorinput {color:#000000; font-size: 14pt; background-color:#ffffff; border:1 solid #000000;size= 60;height:20px;cursor:n-resize}
</style>
</HEAD>
<BODY onLoad="capture()">
<div align="center">
<table border=0 cellpadding=3 cellspacing=3>
<tr>
<td colspan=3>
<b><font color=red>마우스를 이미지 위에 올려놓으면 원하는 색상을 찾을 수 있어요!<br>
원하는색상에 마우스를 올린상태에서 클릭하시면 색상코드가 복사가됩니다.</font></b>
</td>
</tr>
<tr>
<td id=wheel>
<img src="http://suldo.x-y.net/img/colorwheel.jpg" width=256 height=256 border=0 onClick="javascript:HighlightAll('f.t')">
</td>
<td align="center" id="rgbColor" width=256 height=256 border=0 style="border:1 solid #000000">
<br>
<form name="f">
색상코드 : <input type="text" name="t" size="7" maxlength="7" readOnly class=colorinput>
</form>
</td>
</tr>
</table>
</div>
</body>
</html>
에디터등을 이용해서..htm파일로 만들어 실행시키면..언제든지 간단하게..원하는 색상값을 찾을수 있겠습니다...(누가 만들었는지..원..멋져)
<html>
<head>
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<SCRIPT LANGUAGE="JavaScript">
<!-- 만든 넘 : D10n (biab@iinet.net.au) -->
<!-- 그넘 홈 : http://www.iinet.net.au/~biab -->
<!-- 수정한 넘 : 윤면용 -->
<!-- 수정한 홈 : http://www.dhtmldot.com -->
<!-- 또수정한 넘 : 술도짱 -->
<!-- 또수정한 홈 : http://www.suldo.net -->
<!-- Begin
addary = new Array(); //red
addary[0] = new Array(0,1,0); //red green
addary[1] = new Array(-1,0,0); //green
addary[2] = new Array(0,0,1); //green blue
addary[3] = new Array(0,-1,0); //blue
addary[4] = new Array(1,0,0); //red blue
addary[5] = new Array(0,0,-1); //red
addary[6] = new Array(255,1,1);
clrary = new Array(360);
for(i = 0; i < 6; i++)
for(j = 0; j < 60; j++) {
clrary[60 * i + j] = new Array(3);
for(k = 0; k < 3; k++) {
clrary[60 * i + j][k] = addary[6][k];
addary[6][k] += (addary[i][k] * 4);
}
}
function capture() {
if(document.layers) {
layobj = document.layers['wheel'];
layobj.document.captureEvents(Event.MOUSEMOVE);
layobj.document.onmousemove = moved;
}
else {
layobj = document.all["wheel"];
layobj.onmousemove = moved;
}
}
function moved(e) {
y = 4 * ((document.layers)?e.layerX:event.offsetX);
x = 4 * ((document.layers)?e.layerY:event.offsetY);
sx = x - 512;
sy = y - 512;
qx = (sx < 0)?0:1;
qy = (sy < 0)?0:1;
q = 2 * qy + qx;
quad = new Array(-180,360,180,0);
xa = Math.abs(sx);
ya = Math.abs(sy);
d = ya * 45 / xa;
if(ya > xa) d = 90 - (xa * 45 / ya);
deg = Math.floor(Math.abs(quad[q] - d));
n = 0;
sx = Math.abs(x - 512);
sy = Math.abs(y - 512);
r = Math.sqrt((sx * sx) + (sy * sy));
if(x == 512 & y == 512) {
c = "000000";
}
else {
for(i = 0; i < 3; i++) {
r2 = clrary[deg][i] * r / 256;
if(r > 256) r2 += Math.floor(r - 256);
if(r2 > 255) r2 = 255;
n = 256 * n + Math.floor(r2);
}
c = n.toString(16);
while(c.length < 6) c = "0" + c;
}
if(document.layers) {
document.layers["wheel"].document.f.t.value = "#" + c;
// document.layers["wheel"].bgColor = "#" + c;
document.layers["rgbColor"].bgColor = "#" + c;
}
else {
document.all["wheel"].document.f.t.value = "#" + c;
// document.all["wheel"].style.backgroundColor = "#" + c;
document.all["rgbColor"].style.backgroundColor = "#" + c;
}
return false;
}
function changeColor() {
document.all["rgbColor"].style.backgroundColor = f.value;
}
//0=클립보드에 복사를 안합니다., 1=클립보드에 복사를합니다.
var copytoclip=1
function HighlightAll(theField) {
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
if (document.all&©toclip==1){
therange=tempval.createTextRange()
therange.execCommand("Copy")
window.status="색상코드를 복사 했습니다.!"
alert("색상코드를 복사 했습니다.!");
setTimeout("window.status=''",1800)
}
}
// End -->
</script>
<style type="text/css">
body{color:#000000; font-size: 9pt; background-color:#ffffff;}
.colorinput {color:#000000; font-size: 14pt; background-color:#ffffff; border:1 solid #000000;size= 60;height:20px;cursor:n-resize}
</style>
</HEAD>
<BODY onLoad="capture()">
<div align="center">
<table border=0 cellpadding=3 cellspacing=3>
<tr>
<td colspan=3>
<b><font color=red>마우스를 이미지 위에 올려놓으면 원하는 색상을 찾을 수 있어요!<br>
원하는색상에 마우스를 올린상태에서 클릭하시면 색상코드가 복사가됩니다.</font></b>
</td>
</tr>
<tr>
<td id=wheel>
<img src="http://suldo.x-y.net/img/colorwheel.jpg" width=256 height=256 border=0 onClick="javascript:HighlightAll('f.t')">
</td>
<td align="center" id="rgbColor" width=256 height=256 border=0 style="border:1 solid #000000">
<br>
<form name="f">
색상코드 : <input type="text" name="t" size="7" maxlength="7" readOnly class=colorinput>
</form>
</td>
</tr>
</table>
</div>
</body>
</html>