javascript 팁이 있는 곳입니다.
  • 웹미니 한줄 전광판 영역 입니다.
글 수 109
미리보기 :  
플래시에서 가능한 한줄 뉴스티커효과입니다.
[1단계] 아래의 코드를 <head> 와 </head> 사이에 붙여 넣으세요.

<style type="text/css">
/** 뉴스티커가 보여질 창에 대한 설정입니다 **/
#memoryticker{
background-color: lightyellow; /**배경색상**/
width: 450px; /**가로크기**/
font: bold 12px Verdana; /**글꼴**/
border: 1px solid black; /**테두리**/
padding: 3px; /**안쪽여백**/
filter: progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)
}
</style>

[2단계] 아래의 코드를 <body> 와 </body> 태그 사이에 붙여 넣으세요.

<script type="text/javascript">
var tickercontents=new Array()

/** 아래의 방식으로 출력할 메세지들을 설정 하세요 **/
tickercontents[0]='1) <a href="http://">웹미니쩜넷</a>- 홈페이지 디자인 관련 자료</a>'
tickercontents[1]='2) <a href="http://www.naver.com">네이버 홈페이지</a>- 네이버 검색 엔진</a>'
tickercontents[2]='3) <a href="http://www.yahoo.co.kr">야후 코리아</a>- Yahoo!!</a>'
tickercontents[3]='4) <a href="http://www.dreamwiz.com">드림위즈</a>- 드림위즈 홈페이지</a>'

var persistlastviewedmsg=1 // 세로고침을 할때 기존의 메세지 다음부터 보여줄지, 아니면 처음부터 보여줄지 여부 (0 혹은 1)
var persistmsgbehavior="onload" // "onload" 혹은 "onclick" 으로 설정 할 수 있습니다

// 메세지별로 지연시간을 설정 하세요
var tickdelay=3000

var divonclick=(persistlastviewedmsg && persistmsgbehavior=="onclick")? 'onClick="savelastmsg()" ' : ''
var currentmessage=0

function changetickercontent(){
if (crosstick.filters && crosstick.filters.length>0)
crosstick.filters[0].Apply()
crosstick.innerHTML=tickercontents[currentmessage]
if (crosstick.filters && crosstick.filters.length>0)
crosstick.filters[0].Play()
currentmessage=(currentmessage==tickercontents.length-1)? currentmessage=0 : currentmessage+1
var filterduration=(crosstick.filters&&crosstick.filters.length>0)? crosstick.filters[0].duration*1000 : 0
setTimeout("changetickercontent()",tickdelay+filterduration)
}

function beginticker(){
if (persistlastviewedmsg && get_cookie("lastmsgnum")!="")
revivelastmsg()
crosstick=document.getElementById? document.getElementById("memoryticker") : document.all.memoryticker
changetickercontent()
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = ""
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function savelastmsg(){
document.cookie="lastmsgnum="+currentmessage
}

function revivelastmsg(){
currentmessage=parseInt(get_cookie("lastmsgnum"))
currentmessage=(currentmessage==0)? tickercontents.length-1 : currentmessage-1
}

if (persistlastviewedmsg && persistmsgbehavior=="onload")
window.onunload=savelastmsg

if (document.all||document.getElementById)
document.write('<div id="memoryticker" '+divonclick+'></div>')
if (window.addEventListener)
window.addEventListener("load", beginticker, false)
else if (window.attachEvent)
window.attachEvent("onload", beginticker)
else if (document.all || document.getElementById)
window.onload=beginticker

</script>
profile 글쓴이 빽짱구

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

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

첫번째 댓글을 남겨주세요!

List of Articles
번호 제목 글쓴이 날짜 추천 수 조회 수
69 hit 마우스 오버시 레이어창 뜨기 (파폭.익스지원) title: [ani]깜빡이는 표정빽짱구 2007-11-06   19805
68 hit best of best 이미지가 서서히 변하는 롤오버 효과 title: [ani]깜빡이는 표정빽짱구 2006-08-30 32 14362
67 hit 요일마다 바뀌는 상태바 인사 말 [1] title: [ani]깜빡이는 표정빽짱구 2006-05-08 12 10054
66 hit best of best 아이프레임 크기 자동조절 [1] title: [ani]깜빡이는 표정빽짱구 2006-05-02 28 12024
65 hit best of best 따라다니는 톱버튼 (파이어폭스,익스지원) title: [ani]깜빡이는 표정빽짱구 2006-03-30 29 12901
64 best of best 타이틀을 랜덤으로 바꾸기 title: [ani]깜빡이는 표정빽짱구 2006-03-28 29 9810
63 hit best of best 자동으로 년도,월,일,요일,시간 나오게 하기 title: [ani]깜빡이는 표정빽짱구 2006-03-28 22 10948
62 hit 클릭시 시작페이지로 설정하기 title: [ani]깜빡이는 표정빽짱구 2006-03-28 7 12989
61 hit 탭메뉴 소스 title: [ani]깜빡이는 표정빽짱구 2006-03-09 14 15212
60 hit index 페이지에 다른문서 불러오기? title: [ani]깜빡이는 표정빽짱구 2006-03-09 4 10276
59 해상도가 틀리면 접속못하게 하는 소스 title: [ani]깜빡이는 표정빽짱구 2006-03-06 5 6850
58 hit 깔끔한 공지창 title: [ani]깜빡이는 표정빽짱구 2006-03-06 2 51257
57 F11키 막기 스크립트 title: [ani]깜빡이는 표정빽짱구 2006-03-05 10 7781
56 빈링크 #로 링크걸지 않고 다른방법으로 하기 [3] title: [ani]깜빡이는 표정빽짱구 2006-02-23 6 8013
55 hit 팝업창 관련 속성들 title: [ani]깜빡이는 표정빽짱구 2006-02-07 7 11461
54 브라우저를 동적으로 부드럽게 리사이징하기 title: [ani]깜빡이는 표정빽짱구 2006-02-05 14 8339
53 best of best 제자리에서 페이딩되면서 바뀌며보여주는 뉴스티커 title: [ani]깜빡이는 표정빽짱구 2006-01-07 32 8458
52 창의크기를 자연스럽게 조절하자 title: [ani]깜빡이는 표정빽짱구 2006-01-07 3 5316
51 자바스크립트로 부드럽게 창제어하기 title: [ani]깜빡이는 표정빽짱구 2006-01-07 12 9133
50 외부에서 자바스크립 js 파일 불러들이기 title: [ani]깜빡이는 표정빽짱구 2005-12-21 6 6772