A

롤링배너객체 Rolling

· 17년 전 · 2335
------------------------------------- Config -------------------------------------
var myRolling = new Rolling(appendElement,width,height,방향[0-좌,1-우,2-상,3-하],스크롤픽셀,호출주기,딜레이);
myRolling.box.innerHTML = "";
myRolling.box.innerHTML += "<div style='width:80px; height:20px; background:#FEA700;'>1</div>";
myRolling.box.innerHTML += "<div style='width:80px; height:20px; background:#FEDD00;'>2</div>";
myRolling.box.innerHTML += "<div style='width:80px; height:20px; background:#FEF500;'>3</div>";
myRolling.box.innerHTML += "<div style='width:80px; height:20px; background:#D7FE00;'>4</div>";
myRolling.Init();    //객체초기화
myRolling.Run();    //객체실행
------------------------------------- Config -------------------------------------


<html>
<head>
<title></title>
<script type="text/javascript" src="Rolling.js"></script>
</head>
<body>

<div id="test1" style="border: 1px solid #000000; width: 800px; height: 150px;"></div>
<br><br>
<div id="test2" style="border: 1px solid #000000; width: 800px; height: 150px;"></div>
<br><br>
<div id="test3" style="border: 1px solid #000000; width: 800px; height: 150px;"><br><br><br></div>
<br><br>
<div id="test4" style="border: 1px solid #000000; width: 800px; height: 150px;"></div>

<script type="text/javascript">
var myRolling1 = new Rolling(document.getElementById("test1"),700,26,2,2,30,3000);
myRolling1.box.innerHTML = "";
myRolling1.box.innerHTML += "<div><nobr><img src='http://www.phpschool.com/menu_images/top_menu1_off.gif'><img src='http://www.phpschool.com/menu_images/top_menu2_off.gif'><img src='http://www.phpschool.com/menu_images/top_menu3_off.gif'><img src='http://www.phpschool.com/menu_images/top_menu4_off.gif'><img src='http://www.phpschool.com/menu_images/top_menu5_off.gif'><img src='http://www.phpschool.com/menu_images/top_menu6_off.gif'><img src='http://www.phpschool.com/menu_images/top_menu7_off.gif'><img src='http://www.phpschool.com/menu_images/top_menu8_off.gif'></nobr></div>";
myRolling1.box.innerHTML += "<div><nobr><img src='http://www.phpschool.com/menu_images/top_menu1_on.gif'><img src='http://www.phpschool.com/menu_images/top_menu2_on.gif'><img src='http://www.phpschool.com/menu_images/top_menu3_on.gif'><img src='http://www.phpschool.com/menu_images/top_menu4_on.gif'><img src='http://www.phpschool.com/menu_images/top_menu5_on.gif'><img src='http://www.phpschool.com/menu_images/top_menu6_on.gif'><img src='http://www.phpschool.com/menu_images/top_menu7_on.gif'><img src='http://www.phpschool.com/menu_images/top_menu8_on.gif'></nobr></div>";
myRolling1.Init();
myRolling1.Run();

var myRolling2 = new Rolling(document.getElementById("test2"),240,50,0,2,10,1000);
myRolling2.box.style.border = "1px solid orange";
myRolling2.box.innerHTML = "";
myRolling2.box.innerHTML += "<div style='width:80px; height:20px; background:#FEA700;'>1</div>";
myRolling2.box.innerHTML += "<div style='width:80px; height:20px; background:#FEDD00;'>2</div>";
myRolling2.box.innerHTML += "<div style='width:80px; height:20px; background:#FEF500;'>3</div>";
myRolling2.box.innerHTML += "<div style='width:80px; height:20px; background:#D7FE00;'>4</div>";
myRolling2.Init();
myRolling2.Run();

var myRolling3 = new Rolling(document.getElementById("test3"),700,30,1,2,1,100);
myRolling3.box.style.border = "1px solid green";
myRolling3.box.innerHTML = "";
myRolling3.box.innerHTML += "<div style='width:80px; height:20px; background:#FEA700;'>1</div>";
myRolling3.box.innerHTML += "<div style='width:80px; height:20px; background:#FEDD00;'>2</div>";
myRolling3.box.innerHTML += "<div style='width:80px; height:20px; background:#FEF500;'>3</div>";
myRolling3.box.innerHTML += "<div style='width:80px; height:20px; background:#D7FE00;'>4</div>";
myRolling3.box.innerHTML += "<div style='width:80px; height:20px; background:#B9FE00;'>5</div>";
myRolling3.box.innerHTML += "<div style='width:80px; height:20px; background:#83FE00;'>6</div>";
myRolling3.box.innerHTML += "<div style='width:80px; height:20px; background:#30FE00;'>7</div>";
myRolling3.box.innerHTML += "<div style='width:80px; height:20px; background:#38EF0D;'>8</div>";
myRolling3.Init();
myRolling3.Run();

var myRolling4 = new Rolling(document.getElementById("test4"),400,140,3,2,40,1000);
myRolling4.box.style.border = "1px solid red";
myRolling4.box.innerHTML = "";
myRolling4.box.innerHTML += "<div style='width:300px; height:20px; background:#FEA700;'>1</div>";
myRolling4.box.innerHTML += "<div style='width:300px; height:20px; background:#FEDD00;'>2</div>";
myRolling4.box.innerHTML += "<div style='width:300px; height:20px; background:#FEF500;'>3</div>";
myRolling4.box.innerHTML += "<div style='width:300px; height:20px; background:#D7FE00;'>4</div>";
myRolling4.box.innerHTML += "<div style='width:300px; height:20px; background:#B9FE00;'>5</div>";
myRolling4.box.innerHTML += "<div style='width:300px; height:20px; background:#83FE00;'>6</div>";
myRolling4.box.innerHTML += "<div style='width:300px; height:20px; background:#30FE00;'>7</div>";
myRolling4.box.innerHTML += "<div style='width:300px; height:20px; background:#38EF0D;'>8</div>";
myRolling4.Init();
myRolling4.Run();
</script>

</body>
</html>
[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]

첨부파일

Rolling.js (5.6 KB) 150회 2008-09-18 17:55
|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

프로그램

+
제목 글쓴이 날짜 조회
17년 전 조회 1,502
17년 전 조회 1,092
17년 전 조회 1,227
17년 전 조회 3,099
17년 전 조회 2,163
17년 전 조회 1,971
17년 전 조회 1,217
17년 전 조회 2,451
17년 전 조회 1,170
17년 전 조회 1,130
17년 전 조회 1,376
17년 전 조회 2,742
17년 전 조회 2,395
17년 전 조회 2,482
17년 전 조회 1,181
17년 전 조회 1,300
17년 전 조회 3,245
17년 전 조회 2,831
17년 전 조회 4,099
17년 전 조회 2,261
17년 전 조회 2,357
17년 전 조회 1,407
17년 전 조회 2,526
17년 전 조회 2,209
17년 전 조회 2,970
17년 전 조회 2,482
17년 전 조회 1,642
17년 전 조회 2,435
17년 전 조회 1,591
17년 전 조회 1,179
17년 전 조회 2,238
17년 전 조회 2,886
17년 전 조회 4,061
17년 전 조회 3,148
17년 전 조회 1,417
17년 전 조회 1,707
17년 전 조회 2,247
17년 전 조회 1,551
17년 전 조회 1,728
17년 전 조회 2,718
17년 전 조회 2,144
17년 전 조회 1,796
17년 전 조회 4,201
17년 전 조회 3,047
17년 전 조회 1,444
17년 전 조회 3,573
17년 전 조회 2,800
17년 전 조회 2,079
17년 전 조회 1,300
17년 전 조회 2,336
17년 전 조회 2,071
17년 전 조회 1,984
17년 전 조회 1,927
17년 전 조회 1,179
17년 전 조회 1,886
17년 전 조회 2,937
17년 전 조회 1,437
17년 전 조회 1,677
17년 전 조회 1,359
17년 전 조회 1,607
17년 전 조회 1,582
17년 전 조회 1,454
17년 전 조회 2,565
17년 전 조회 2,331
17년 전 조회 2,109
17년 전 조회 1,418
17년 전 조회 2,433
17년 전 조회 4,256
17년 전 조회 2,741
17년 전 조회 1,665
17년 전 조회 1,859
17년 전 조회 3,236
17년 전 조회 2,236
17년 전 조회 3,832
17년 전 조회 1,682
17년 전 조회 2,275
17년 전 조회 2,107
17년 전 조회 1,622
17년 전 조회 2,136
17년 전 조회 1,932
17년 전 조회 1,969
17년 전 조회 3,079
17년 전 조회 2,154
17년 전 조회 1,444
17년 전 조회 1,467
17년 전 조회 2,130
17년 전 조회 3,206
17년 전 조회 2,145
17년 전 조회 1,539
17년 전 조회 4,240
17년 전 조회 2,031
17년 전 조회 3,462
17년 전 조회 6,035
17년 전 조회 1,491
17년 전 조회 1,659
17년 전 조회 1,241
17년 전 조회 1,354
17년 전 조회 2,877
17년 전 조회 1,916
17년 전 조회 2,599
🐛 버그신고