웹개발
Category
JSP/Servlet
ASP
ASP.NET
PHP
웹디자인
Category
Photoshop
Illustrator
Flash
클라이언트 스크립트
Category
●
Javascript Example
Javascript
CSS3
HTML5
데이타 베이스
Category
MySQL
MSSQL
커뮤니티
Category
공지사항
개발자마당
엔지니어마당
자유마당
플래쉬게임
여행과정보
질문과 답변
Category
웹개발 질문과답변
디자인 질문과답변
자료실
Category
이미지 자료실
개발 자료실
클럽
Category
자동차클럽
하늘소리
공이랑
Javascript Example
Javascript
CSS3
HTML5
Javascript Example
제 목
[TEXT] 텍스트가 페이딩 롤오버 됩니다.
작성자
운영자
등록일
200807260115320
조회수
23,978
텍스트가 페이딩 롤오버 되는 자바스크립트 소스입니다.
<style> A{color:Navy; text-decoration:none} A:hover{color:red} A:visited:{color:#808080} TD{font-family:arial,helvetica; font-size:10pt} </style> <script language="JavaScript1.2"> /******************************************************************************** This script is made by and copyrighted to Thomas Brattli at www.bratta.com Visit for more great scripts. This may be used freely as long as this msg is intact! ******************************************************************************** Browsercheck:*/ ie=document.all?1:0 n=document.layers?1:0 /******************************************************************************** Here are the variables you must set: (this is the only part you have to change) Remember tho, if you wan't different size for the layers, different clip or anything change that in the stylesheet. */ //The delay between the fades (in milliseconds) smaller value gives less time: betweendelay=3000 //Do you wan't it to start over on the first one when it's gone trought all the news? //(set to 0 if not) var loop=1 //What font do you want it use? FontFace='arial,helvetiva' //What font-size (in pixel)? FontSize=14 //Do you want it to fade out as well? 1 for on, 0 for off fadeback=1 //Set the colors, first color is same as background, last color is the color it stops at: //You can have upto 7 colors, set the ones you wan't use to 0 colors=new Array() colors[0]='#ffffff' colors[1]='#EEEEEE' colors[2]='#CCCCCC' colors[3]='#999999' colors[4]='#666666' colors[5]='#333333' colors[6]='#000000' //This is the news you wanna have, set the link and the text. If you don't wan't it to link anywhere //use a # as the link news=new Array() //Copy the three lines and change the info and numbers to get more news. news[0]=new Array() news[0]["text"]="JavaScript Resources contains hundreds of FREE JavaScripts and DHTML scripts!" news[0]["link"]="http://www.jsr.communitech.net/" news[1]=new Array() news[1]["text"]="Visit also my site about where I live, Alan\ 's Page - A Guide to Greenwich and Charlton" news[1]["link"]="http://ourworld.compuserve.com/homepages/apalmer/" /*Dont change anything below this! ******************************************************************************** */ fadeInit=new Function("oNews=new makeObj('divNews','divCont'); fadeNews(0)") function makeObj(obj,nest){ nest=(!nest) ? '':'document.'+nest+'.' this.css=(n) ? eval(nest+'document.'+obj):eval(obj+'.style') this.writeref=(n) ? eval(nest+'document.'+obj+'.document'):eval(obj); this.fadeIt=b_fadeIt this.obj = obj + "Object"; eval(this.obj + "=this") } function b_fadeIt(text,link,font,size,speed,fn,num,c0,c1,c2,c3,c4,c5,c6){ if(num<arguments.length && arguments[num]!=0){ writetext='<a href="'+link+'" style="text-decoration:none; font-size:'+size+'px">' +'<font face="'+font+'" color="'+arguments[num]+'">'+text+'</font></a>' if(n){this.writeref.write(writetext); this.writeref.close()} if(ie) this.writeref.innerHTML=writetext num++ setTimeout(this.obj+'.fadeIt("'+text+'","'+link+'","'+font+'",'+size+','+speed+',"' +fn+'",'+num+',"'+c0+'","'+c1+'","'+c2+'","'+c3+'","'+c4+'","'+c5+'","'+c6+'")',speed) }else setTimeout('eval('+fn+')',betweendelay) } function fadeNews(num){ if(num<news.length){ fn=fadeback?'fadeBack('+num+')':'fadeNews('+(num+1)+')'; oNews.fadeIt(news[num]["text"],news[num]["link"],FontFace,FontSize,100,fn,7, colors[0],colors[1],colors[2],colors[3],colors[4],colors[5],colors[6]) }else if(loop)fadeNews(0) } function fadeBack(num){ if(num>=0){ oNews.fadeIt(news[num]["text"],news[num]["link"],FontFace,FontSize,100,'fadeNews('+(num+1) +')',7,colors[6],colors[5],colors[4],colors[3],colors[2],colors[1],colors[0]) } } onload=fadeInit; /*End of fadescript ******************************************************************************** **/ </script> <body> <div id="divCont" style="position:absolute; width:250; height:200; left:750; top:400"> <div id="divNews" style="position:absolute"> <script>//We gotta write something here so netscape will make it //be the correct size, but we will only write if it's a 4.x browser if(document.all || document.layers) document.write("dummy text, dummy" +"text, you can place you fist news or a welcome msg or something here." +"If you place these layers inside a table or something you can also" +"use this as the msg that browsers that doesn't suport dhtml will see.") </script> </div> </div>
0
0
※ 짧은 댓글일수록 예의를 갖추어 작성해 주시기 바랍니다.
번호
제목
글쓴이
추천
조회
날짜
238
[SELECT] SELECT BOX에서 선택된 OPTION VALUE 와 TEXT 가져오기
운영자
18 /
8
82995
2008-08-09
237
[TIME] 앞으로 남은 날짜를 계산해줍니다.
운영자
0 /
0
23857
2008-08-09
236
[TIME] 타이머 자바스크립트
운영자
0 /
0
23809
2008-08-09
235
[CALENDAR] 팝업 카렌더 II
운영자
0 /
1
25358
2008-08-09
234
[TEXT] 텍스트 하이라이트 효과
운영자
0 /
0
31072
2008-08-09
233
[TEXT] 자연스럽게 좌-우측으로 페이딩 아웃되는 스크롤 텍스트
운영자
0 /
1
24062
2008-08-08
232
[CALENDAR] 심플한 달력!
운영자
0 /
0
24514
2008-08-07
231
[IMAGE] 파일 업로드시 이미지 미리보기
운영자
0 /
17
28928
2008-08-04
230
[TABLE] 마우스 오버시 테이블이 페이드 인 아웃됩니다!
운영자
2 /
0
24899
2008-08-04
229
[CALCULATOR] 심플한 계산기
운영자
0 /
0
24527
2008-08-01
228
[PASSWORD] 패스워드를 입력해야만 페이지를 볼수 있습니다.
운영자
0 /
0
26444
2008-07-31
227
[TEXT] 폼안에서 글자가 타이핑 됩니다.
운영자
0 /
0
24375
2008-07-30
226
[WINDOW] 브라우저 흔들기
운영자
0 /
0
24075
2008-07-29
225
[TABLE] 테이블 가로라인 이동
운영자
0 /
0
24878
2008-07-28
224
[TEXT] 텍스트가 페이딩 롤오버 됩니다.
운영자
0 /
0
23978
2008-07-26
223
[LINK] 링크된 텍스테에 마우스를 올리면 색상이 깜빡거립니다.
운영자
0 /
0
23766
2008-07-25
222
[TABLE] 테이블 소트시키기 II
운영자
0 /
0
24096
2008-07-21
221
[FILE] 버튼을 누르면 첨부파일 입력창 갯수가 늘어납니다.
운영자
0 /
0
23701
2008-07-20
220
[TOOLTIP] 말풍선 툴팁!
운영자
1 /
9
29803
2008-07-17
219
[TABLE] 드래그 & 드롭 테이블
운영자
0 /
4
27979
2008-07-08
218
[MENU] 슬라이딩 메뉴
운영자
0 /
0
33196
2008-07-07
217
[TABLE] 테이블 하이라이트 효과
운영자
0 /
0
24693
2008-07-05
216
[MENU] 네이버 콤보 스타일 (토글 리스트 메뉴)
운영자
0 /
0
26918
2008-07-04
215
[INPUT BOX] 정규식을 이용한 공백(SPACE) 체크하기
운영자
2 /
3
65647
2008-07-03
214
[POPUP] 간단한 풍선도움말
운영자
0 /
0
23644
2008-07-02
[1]
[2]
[3]
[4]
[5]
6
[7]
[8]
[9]
[10]
제목
내용
제목+내용
작성자