웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
다이나믹 HTML 스크립트 - 간편 공지사항에....
2002.03.28 08:48
예제보기: http://my.dreamwiz.com/dong098/study28.htm
☆ 수정가능 부분:
message[0], [1] [2] .... --> 에 들가는 말을 바꿀수있고.
var bgcolor="#FFFFFF";
var color="red";
--> 요부분은 배경 색과 글자 색상이다.
<HEAD> 와 </HEAD> 사이에 넣어주세요.
///////////////////////////////////////////////////////////////////
<Script Language="Javascript">
bname=navigator.appName;
bversion=parseInt(navigator.appVersion)
if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" && bversion>=4)){
if (bname=="Netscape"){
brows=true
dt=1
}
else{
brows=false
dt=40
}
var z=0;
var msg=0;
var rgb=0;
var status=true;
var updwn=false;
var message= new Array();
var value=0;
var timer1;
var timer2;
var timer3;
var convert = new Array()
var hexbase= new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F");
// Put here your own messages. Add as many as you wan't (Do not edit anything else in the Script except the lines below)
var bgcolor="#FFFFFF";
var color="red";
message[0]='Welcome'
message[1]='Yoonmi House!'
message[2]='http://yoonmi.waa.to'
message[3]='<a href="http://yoonmi.waa.tor" target="_blank">윤미네집으로 곧장가기! 클릭!</a>'
message[4]='글은 이렇게 여러게로 쓸수있습니다.'
message[5]='실시간 공지사항도 가능하겠죠.'
message[6]='<a href="http://girl.waa.to">여자들의 대 모임 뷰티팸 홈페이지로 고!!</a>'
message[7]='ㅎㅎ'
// Put here your own messages. Add as many as you wan't (Do not edit anything else in the Script except the lines above)
for (x=0; x<16; x++){
for (y=0; y<16; y++){
convert[value]= hexbase[x] + hexbase[y];
value++;
}
}
redx=color.substring(1,3);
greenx=color.substring(3,5);
bluex=color.substring(5,7);
hred=eval(parseInt(redx,16));
hgreen=eval(parseInt(greenx,16));
hblue=eval(parseInt(bluex,16));
eredx=bgcolor.substring(1,3);
egreenx=bgcolor.substring(3,5);
ebluex=bgcolor.substring(5,7);
ered=eval(parseInt(eredx,16));
egreen=eval(parseInt(egreenx,16));
eblue=eval(parseInt(ebluex,16));
red=ered;
green=egreen;
blue=eblue;
function start(){
if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" && bversion>=4)){
if (brows)
res=document.layers['textanim'].top
else
res=textanim.style.top
updwn=true;
timer1=window.setInterval('up()',dt)
}
}
function stop(){
if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" && bversion>=4)){
window.clearInterval(timer1);
window.clearInterval(timer2);
window.clearTimeout(timer3);
}
}
function breakf(){
if (status){
window.clearInterval(timer1);
window.clearInterval(timer2);
window.clearTimeout(timer3);
status=false
return;
}
else{
if (updwn)
timer1=window.setInterval('up()',dt)
else
timer2=window.setInterval('down()',dt)
status=true;
}
}
function up(){
if (red<hred){
if ((red+15)<hred){
red+=15;
redx = convert[red]
}
else{
red=hred
redx = convert[red]
}
}
if (red>hred){
if ((red-15)>hred){
red-=15;
redx = convert[red]
}
else{
red=hred
redx = convert[red]
}
}
if (green<hgreen){
if ((green+15)<hgreen){
green+=15;
greenx = convert[green]
}
else{
green=hgreen
greenx = convert[green]
}
}
if (green>hgreen){
if ((green-15)>hgreen){
green-=15;
greenx = convert[green]
}
else{
green=hgreen
greenx = convert[green]
}
}
if (blue<hblue){
if ((blue+15)<hblue){
blue+=15;
bluex = convert[blue]
}
else{
blue=hblue
bluex = convert[blue]
}
}
if (blue>hblue){
if ((blue-15)>hblue){
blue-=15;
bluex = convert[blue]
}
else{
blue=hblue
bluex = convert[blue]
}
}
rgb = "#"+redx+greenx+bluex;
if (brows){
document.layers['textanim'].document.linkColor=rgb;
document.layers['textanim'].document.vlinkColor=rgb;
document.layers['textanim'].document.writeln('<Pre><P Class="main" Align="Center"><font color="'+rgb+'">'+message[msg]+'</font></P></Pre>')
document.layers['textanim'].document.close();
}
else{
textanim.document.linkColor=rgb;
textanim.document.vlinkColor=rgb;
textanim.innerHTML='<Pre><P Class="main" Align="Center"><font color="'+rgb+'">'+message[msg]+'</font></P></Pre>'
}
if (z<19){
if (brows)
document.layers['textanim'].top-=2
else
textanim.style.posTop-=2
z++
}
else
{
updwn=false;
window.clearInterval(timer1);
timer2=window.setInterval('down()',dt)
}
}
function down(){
if (red<ered){
if ((red+15)<ered){
red+=15;
redx = convert[red]
}
else{
red=ered
redx = convert[red]
}
}
if (red>ered){
if ((red-15)>ered){
red-=15;
redx = convert[red]
}
else{
red=ered
redx = convert[red]
}
}
if (green<egreen){
if ((green+15)<egreen){
green+=15;
greenx = convert[green]
}
else{
green=egreen
greenx = convert[green]
}
}
if (green>egreen){
if ((green-15)>egreen){
green-=15;
greenx = convert[green]
}
else{
green=egreen
greenx = convert[green]
}
}
if (blue<eblue){
if ((blue+15)<eblue){
blue+=15;
bluex = convert[blue]
}
else{
blue=eblue
bluex = convert[blue]
}
}
if (blue>eblue){
if ((blue-15)>eblue){
blue-=15;
bluex = convert[blue]
}
else{
blue=eblue
bluex = convert[blue]
}
}
rgb = "#"+redx+greenx+bluex;
if (brows){
document.layers['textanim'].document.linkColor=rgb;
document.layers['textanim'].document.vlinkColor=rgb;
document.layers['textanim'].document.writeln('<Pre><P Class="main" Align="Center"><font color="'+rgb+'">'+message[msg]+'</font></P></Pre>')
document.layers['textanim'].document.close();
}
else{
textanim.document.linkColor=rgb;
textanim.document.vlinkColor=rgb;
textanim.innerHTML='<Pre><P Class="main" Align="Center"><font color="'+rgb+'">'+message[msg]+'</font></P></Pre>'
}
if (z<38){
if (brows)
document.layers['textanim'].top-=2
else
textanim.style.posTop-=2
z++
}
else
{
if (brows){
document.layers['textanim'].document.writeln('')
document.layers['textanim'].document.close();
}
else
textanim.innerHTML='';
window.clearInterval(timer2);
if(msg<message.length-1){
msg++;
z=0;
if (brows)
document.layers['textanim'].top=res;
else
textanim.style.top=res;
timer3=window.setTimeout('start()',100);
}
else
{
msg=0;
z=0;
if (brows)
document.layers['textanim'].top=res;
else
textanim.style.top=res;
timer3=window.setTimeout('start()',2000);
}
}
}
}
// done hiding -->
</Script>
<style type="text/css">
<!--
A:LINK {
text-decoration : none;
}
A:VISITED {
text-decoration : none;
}
P.main {
font-family : Comic Sans Ms;
font-size : 16pt;
font-weight : bold;
}
-->
</style>
==========================================================================
<BODY BGCOLOR="#FFFFFF" LINK="#FF0000" VLINK="#FF0000" ALINK="#FFFF00" TEXT="#000000" onLoad="start();" onUnload="stop();">
================================================================================
<BODY>와 </BODY>사이에 입력
===========================================================
<Div id="textanim" style="width:200px; height:200px; position:absolute; left:4px; top:80px; z-index:1;" onclick="breakf()">
<p> </p>
</Div>
<Layer name="textanim" left="4" top="80" id="layer1" width="200" height="200" z-index="1">
<p> </p>
</Layer>
====================================================================================
☆
☆ 수정가능 부분:
message[0], [1] [2] .... --> 에 들가는 말을 바꿀수있고.
var bgcolor="#FFFFFF";
var color="red";
--> 요부분은 배경 색과 글자 색상이다.
<HEAD> 와 </HEAD> 사이에 넣어주세요.
///////////////////////////////////////////////////////////////////
<Script Language="Javascript">
bname=navigator.appName;
bversion=parseInt(navigator.appVersion)
if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" && bversion>=4)){
if (bname=="Netscape"){
brows=true
dt=1
}
else{
brows=false
dt=40
}
var z=0;
var msg=0;
var rgb=0;
var status=true;
var updwn=false;
var message= new Array();
var value=0;
var timer1;
var timer2;
var timer3;
var convert = new Array()
var hexbase= new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F");
// Put here your own messages. Add as many as you wan't (Do not edit anything else in the Script except the lines below)
var bgcolor="#FFFFFF";
var color="red";
message[0]='Welcome'
message[1]='Yoonmi House!'
message[2]='http://yoonmi.waa.to'
message[3]='<a href="http://yoonmi.waa.tor" target="_blank">윤미네집으로 곧장가기! 클릭!</a>'
message[4]='글은 이렇게 여러게로 쓸수있습니다.'
message[5]='실시간 공지사항도 가능하겠죠.'
message[6]='<a href="http://girl.waa.to">여자들의 대 모임 뷰티팸 홈페이지로 고!!</a>'
message[7]='ㅎㅎ'
// Put here your own messages. Add as many as you wan't (Do not edit anything else in the Script except the lines above)
for (x=0; x<16; x++){
for (y=0; y<16; y++){
convert[value]= hexbase[x] + hexbase[y];
value++;
}
}
redx=color.substring(1,3);
greenx=color.substring(3,5);
bluex=color.substring(5,7);
hred=eval(parseInt(redx,16));
hgreen=eval(parseInt(greenx,16));
hblue=eval(parseInt(bluex,16));
eredx=bgcolor.substring(1,3);
egreenx=bgcolor.substring(3,5);
ebluex=bgcolor.substring(5,7);
ered=eval(parseInt(eredx,16));
egreen=eval(parseInt(egreenx,16));
eblue=eval(parseInt(ebluex,16));
red=ered;
green=egreen;
blue=eblue;
function start(){
if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" && bversion>=4)){
if (brows)
res=document.layers['textanim'].top
else
res=textanim.style.top
updwn=true;
timer1=window.setInterval('up()',dt)
}
}
function stop(){
if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" && bversion>=4)){
window.clearInterval(timer1);
window.clearInterval(timer2);
window.clearTimeout(timer3);
}
}
function breakf(){
if (status){
window.clearInterval(timer1);
window.clearInterval(timer2);
window.clearTimeout(timer3);
status=false
return;
}
else{
if (updwn)
timer1=window.setInterval('up()',dt)
else
timer2=window.setInterval('down()',dt)
status=true;
}
}
function up(){
if (red<hred){
if ((red+15)<hred){
red+=15;
redx = convert[red]
}
else{
red=hred
redx = convert[red]
}
}
if (red>hred){
if ((red-15)>hred){
red-=15;
redx = convert[red]
}
else{
red=hred
redx = convert[red]
}
}
if (green<hgreen){
if ((green+15)<hgreen){
green+=15;
greenx = convert[green]
}
else{
green=hgreen
greenx = convert[green]
}
}
if (green>hgreen){
if ((green-15)>hgreen){
green-=15;
greenx = convert[green]
}
else{
green=hgreen
greenx = convert[green]
}
}
if (blue<hblue){
if ((blue+15)<hblue){
blue+=15;
bluex = convert[blue]
}
else{
blue=hblue
bluex = convert[blue]
}
}
if (blue>hblue){
if ((blue-15)>hblue){
blue-=15;
bluex = convert[blue]
}
else{
blue=hblue
bluex = convert[blue]
}
}
rgb = "#"+redx+greenx+bluex;
if (brows){
document.layers['textanim'].document.linkColor=rgb;
document.layers['textanim'].document.vlinkColor=rgb;
document.layers['textanim'].document.writeln('<Pre><P Class="main" Align="Center"><font color="'+rgb+'">'+message[msg]+'</font></P></Pre>')
document.layers['textanim'].document.close();
}
else{
textanim.document.linkColor=rgb;
textanim.document.vlinkColor=rgb;
textanim.innerHTML='<Pre><P Class="main" Align="Center"><font color="'+rgb+'">'+message[msg]+'</font></P></Pre>'
}
if (z<19){
if (brows)
document.layers['textanim'].top-=2
else
textanim.style.posTop-=2
z++
}
else
{
updwn=false;
window.clearInterval(timer1);
timer2=window.setInterval('down()',dt)
}
}
function down(){
if (red<ered){
if ((red+15)<ered){
red+=15;
redx = convert[red]
}
else{
red=ered
redx = convert[red]
}
}
if (red>ered){
if ((red-15)>ered){
red-=15;
redx = convert[red]
}
else{
red=ered
redx = convert[red]
}
}
if (green<egreen){
if ((green+15)<egreen){
green+=15;
greenx = convert[green]
}
else{
green=egreen
greenx = convert[green]
}
}
if (green>egreen){
if ((green-15)>egreen){
green-=15;
greenx = convert[green]
}
else{
green=egreen
greenx = convert[green]
}
}
if (blue<eblue){
if ((blue+15)<eblue){
blue+=15;
bluex = convert[blue]
}
else{
blue=eblue
bluex = convert[blue]
}
}
if (blue>eblue){
if ((blue-15)>eblue){
blue-=15;
bluex = convert[blue]
}
else{
blue=eblue
bluex = convert[blue]
}
}
rgb = "#"+redx+greenx+bluex;
if (brows){
document.layers['textanim'].document.linkColor=rgb;
document.layers['textanim'].document.vlinkColor=rgb;
document.layers['textanim'].document.writeln('<Pre><P Class="main" Align="Center"><font color="'+rgb+'">'+message[msg]+'</font></P></Pre>')
document.layers['textanim'].document.close();
}
else{
textanim.document.linkColor=rgb;
textanim.document.vlinkColor=rgb;
textanim.innerHTML='<Pre><P Class="main" Align="Center"><font color="'+rgb+'">'+message[msg]+'</font></P></Pre>'
}
if (z<38){
if (brows)
document.layers['textanim'].top-=2
else
textanim.style.posTop-=2
z++
}
else
{
if (brows){
document.layers['textanim'].document.writeln('')
document.layers['textanim'].document.close();
}
else
textanim.innerHTML='';
window.clearInterval(timer2);
if(msg<message.length-1){
msg++;
z=0;
if (brows)
document.layers['textanim'].top=res;
else
textanim.style.top=res;
timer3=window.setTimeout('start()',100);
}
else
{
msg=0;
z=0;
if (brows)
document.layers['textanim'].top=res;
else
textanim.style.top=res;
timer3=window.setTimeout('start()',2000);
}
}
}
}
// done hiding -->
</Script>
<style type="text/css">
<!--
A:LINK {
text-decoration : none;
}
A:VISITED {
text-decoration : none;
}
P.main {
font-family : Comic Sans Ms;
font-size : 16pt;
font-weight : bold;
}
-->
</style>
==========================================================================
<BODY BGCOLOR="#FFFFFF" LINK="#FF0000" VLINK="#FF0000" ALINK="#FFFF00" TEXT="#000000" onLoad="start();" onUnload="stop();">
================================================================================
<BODY>와 </BODY>사이에 입력
===========================================================
<Div id="textanim" style="width:200px; height:200px; position:absolute; left:4px; top:80px; z-index:1;" onclick="breakf()">
<p> </p>
</Div>
<Layer name="textanim" left="4" top="80" id="layer1" width="200" height="200" z-index="1">
<p> </p>
</Layer>
====================================================================================
☆
제목 | 글쓴이 | 날짜 |
---|---|---|
배너 링크를 바로 클립보드로 카피하기 [5] | Legend | 2002.04.01 |
[v]최근 업데이트 시간을 자동으로 나타내 보자! [3] | :+:zZion:+: | 2002.03.30 |
[v]하나더! 해상도별 다른 페이지 보여주기 | :+:zZion:+: | 2002.03.30 |
[v]운영 체제별 다른 페이지 보여주기 -_-;v [3] | ┏ⓩZion┛ | 2002.03.30 |
레이어의 상대위치 지정 방법(position:absolute에서...) [2] | Legend | 2002.03.29 |
다이나믹 HTML 스크립트 - 간편 공지사항에.... [1] | ▩윤미 | 2002.03.28 |
[자바스트립트]bidoo님의 레벨메타식 체크박스 보강 | 탐그루 | 2002.03.20 |
:: DB 필요없는 일정관리 .. 거창하게.. -.- [2] | 고전지기 | 2002.03.15 |
자동 팝업창띠우기 소스 [4] | 이슈™ | 2002.03.13 |
홈페이지 패스워드 걸기 소스 [7] | 이슈™ | 2002.03.13 |
스크롤바색상바꿔주는프로그램(수정) [3] | 이슈™ | 2002.03.13 |
▩마우스 주위에 3D 처럼 뱅뱅도는 글자 [6] | ▩윤미 | 2002.03.11 |
테두리가 스믈스믈한 -_-;; | 란즈 | 2002.03.02 |
빠르게 이동하는 텍스트 | 란즈 | 2002.03.02 |
깜박거리는 문자 [1] | 란즈 | 2002.03.02 |
강한 인상을주는 (?) 환영메세지 -_-; [5] | 란즈 | 2002.03.02 |
텍스트 지진(?)효과 내기 | 란즈 | 2002.03.02 |
페이지 사용안하고 팝업띄우기 [4] | 란즈 | 2002.03.02 |
▩물결 처럼 흐르는 것같은 이미지 슬라이드 쇼 [2] | ▩윤미 | 2002.02.28 |
▩마우스를 대면 하이퍼텍스트 스크롤하는 법 (링크할수있음) | ▩윤미 | 2002.02.28 |