A

롤링배너객체 Rolling

· 17년 전 · 2349
------------------------------------- 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,516
17년 전 조회 1,105
17년 전 조회 1,237
17년 전 조회 3,117
17년 전 조회 2,178
17년 전 조회 1,984
17년 전 조회 1,229
17년 전 조회 2,460
17년 전 조회 1,184
17년 전 조회 1,139
17년 전 조회 1,391
17년 전 조회 2,758
17년 전 조회 2,406
17년 전 조회 2,495
17년 전 조회 1,195
17년 전 조회 1,313
17년 전 조회 3,257
17년 전 조회 2,844
17년 전 조회 4,112
17년 전 조회 2,275
17년 전 조회 2,370
17년 전 조회 1,421
17년 전 조회 2,541
17년 전 조회 2,223
17년 전 조회 2,984
17년 전 조회 2,494
17년 전 조회 1,652
17년 전 조회 2,447
17년 전 조회 1,604
17년 전 조회 1,189
17년 전 조회 2,249
17년 전 조회 2,897
17년 전 조회 4,072
17년 전 조회 3,161
17년 전 조회 1,427
17년 전 조회 1,711
17년 전 조회 2,257
17년 전 조회 1,562
17년 전 조회 1,738
17년 전 조회 2,731
17년 전 조회 2,153
17년 전 조회 1,809
17년 전 조회 4,212
17년 전 조회 3,060
17년 전 조회 1,453
17년 전 조회 3,585
17년 전 조회 2,812
17년 전 조회 2,092
17년 전 조회 1,311
17년 전 조회 2,350
17년 전 조회 2,083
17년 전 조회 1,996
17년 전 조회 1,942
17년 전 조회 1,191
17년 전 조회 1,893
17년 전 조회 2,950
17년 전 조회 1,450
17년 전 조회 1,689
17년 전 조회 1,371
17년 전 조회 1,622
17년 전 조회 1,596
17년 전 조회 1,466
17년 전 조회 2,576
17년 전 조회 2,341
17년 전 조회 2,122
17년 전 조회 1,430
17년 전 조회 2,449
17년 전 조회 4,268
17년 전 조회 2,753
17년 전 조회 1,681
17년 전 조회 1,871
17년 전 조회 3,248
17년 전 조회 2,254
17년 전 조회 3,844
17년 전 조회 1,694
17년 전 조회 2,285
17년 전 조회 2,119
17년 전 조회 1,633
17년 전 조회 2,149
17년 전 조회 1,948
17년 전 조회 1,980
17년 전 조회 3,093
17년 전 조회 2,168
17년 전 조회 1,453
17년 전 조회 1,480
17년 전 조회 2,142
17년 전 조회 3,220
17년 전 조회 2,158
17년 전 조회 1,551
17년 전 조회 4,255
17년 전 조회 2,040
17년 전 조회 3,476
17년 전 조회 6,046
17년 전 조회 1,504
17년 전 조회 1,671
17년 전 조회 1,253
17년 전 조회 1,368
17년 전 조회 2,890
17년 전 조회 1,920
17년 전 조회 2,611