http://www.jasko.co.kr/java_data/20020701/overwrap_scroll.html

//---------------------------

< !doctype html public \"-//W3C//DTD HTML 4.0 Transitional//EN\">


J@sko Sample Script







< script language=\"JavaScript1.2\">
var scroller_width=150 // 스크롤러의 가로크기
var scroller_height=115 // 스크롤러의 높이
var bgcolor=\'#F5F5F5\' // 배경색
var pause=3000 // 슬라이드간의 지연시간 (3000=3초)

var scrollercontent=new Array()
// 내용을 입력 하세요 (태그 사용도 가능합니다)
scrollercontent[0]=\'자바스크립트 소스뱅크 JASKO 를 방문 해 보세요\'
scrollercontent[1]=\'이메일 계정이 필요하시면 다음 커뮤니케이션 에서 메일 계정을 만들어 보세요\'
scrollercontent[2]=\'이 스크립트는 메세지들이 오버랩 되면서 위로 스크롤 됩니다\'

var ie4=document.all&&navigator.userAgent.indexOf(\"Opera\")==-1
var dom=document.getElementById&&navigator.userAgent.indexOf(\"Opera\")==-1

if (ie4||dom)
document.write(\'
\')
else if (document.layers){
document.write(\'\'+scrollercontent[0]+\'\')
}

var curpos=scroller_height*(1)
var degree=10
var curcanvas=\"canvas0\"
var curindex=0
var nextindex=1

function moveslide(){
if (curpos>0){
curpos=Math.max(curpos-degree,0)
tempobj.style.top=curpos
}
else{
clearInterval(dropslide)
if (crossobj.filters)
crossobj.filters.alpha.opacity=100
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=1
nextcanvas=(curcanvas==\"canvas0\")? \"canvas0\" : \"canvas1\"
tempobj=ie4? eval(\"document.all.\"+nextcanvas) : document.getElementById(nextcanvas)
tempobj.innerHTML=scrollercontent[curindex]
nextindex=(nextindexsetTimeout(\"rotateslide()\",pause)
}
}

function rotateslide(){
if (ie4||dom){
resetit(curcanvas)
crossobj=tempobj=ie4? eval(\"document.all.\"+curcanvas) : document.getElementById(curcanvas)
crossobj.style.zIndex++
if (crossobj.filters)
document.all.canvas0.filters.alpha.opacity=document.all.canvas1.filters.alpha.opacity=20
else if (crossobj.style.MozOpacity)
document.getElementById(\"canvas0\").style.MozOpacity=document.getElementById(\"canvas1\").style.MozOpacity=0.2
var temp=\'setInterval(\"moveslide()\",50)\'
dropslide=eval(temp)
curcanvas=(curcanvas==\"canvas0\")? \"canvas1\" : \"canvas0\"
}
else if (document.layers){
crossobj.document.write(scrollercontent[curindex])
crossobj.document.close()
}
curindex=(curindex}

function resetit(what){
curpos=scroller_height*(1)
var crossobj=ie4? eval(\"document.all.\"+what) : document.getElementById(what)
crossobj.style.top=curpos
}

function startit(){
crossobj=ie4? eval(\"document.all.\"+curcanvas) : dom? document.getElementById(curcanvas) : document.tickernsmain.document.tickernssub
if (ie4||dom){
crossobj.innerHTML=scrollercontent[curindex]
rotateslide()
}
else{
document.tickernsmain.visibility=\'show\'
curindex++
setInterval(\"rotateslide()\",pause)
}
}

if (ie4||dom||document.layers)
window.onload=startit






크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 홍반장

2005/06/20 10:48 2005/06/20 10:48
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/326

Trackback URL : http://tcbs17.cafe24.com/tc/trackback/326

« Previous : 1 : ... 5270 : 5271 : 5272 : 5273 : 5274 : 5275 : 5276 : 5277 : 5278 : ... 6391 : Next »

블로그 이미지

- 홍반장

Archives

Recent Trackbacks

Calendar

«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Statistics Graph

Site Stats

Total hits:
254306
Today:
44
Yesterday:
500