A

롤링배너객체 Rolling

· 17년 전 · 2345
------------------------------------- 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,508
17년 전 조회 1,098
17년 전 조회 1,232
17년 전 조회 3,108
17년 전 조회 2,173
17년 전 조회 1,979
17년 전 조회 1,223
17년 전 조회 2,455
17년 전 조회 1,177
17년 전 조회 1,138
17년 전 조회 1,384
17년 전 조회 2,747
17년 전 조회 2,402
17년 전 조회 2,491
17년 전 조회 1,189
17년 전 조회 1,307
17년 전 조회 3,252
17년 전 조회 2,836
17년 전 조회 4,107
17년 전 조회 2,268
17년 전 조회 2,362
17년 전 조회 1,416
17년 전 조회 2,536
17년 전 조회 2,220
17년 전 조회 2,977
17년 전 조회 2,487
17년 전 조회 1,648
17년 전 조회 2,441
17년 전 조회 1,598
17년 전 조회 1,184
17년 전 조회 2,244
17년 전 조회 2,890
17년 전 조회 4,070
17년 전 조회 3,157
17년 전 조회 1,424
17년 전 조회 1,709
17년 전 조회 2,252
17년 전 조회 1,557
17년 전 조회 1,731
17년 전 조회 2,726
17년 전 조회 2,152
17년 전 조회 1,803
17년 전 조회 4,208
17년 전 조회 3,056
17년 전 조회 1,448
17년 전 조회 3,576
17년 전 조회 2,808
17년 전 조회 2,087
17년 전 조회 1,306
17년 전 조회 2,346
17년 전 조회 2,078
17년 전 조회 1,992
17년 전 조회 1,938
17년 전 조회 1,187
17년 전 조회 1,891
17년 전 조회 2,945
17년 전 조회 1,444
17년 전 조회 1,684
17년 전 조회 1,370
17년 전 조회 1,615
17년 전 조회 1,589
17년 전 조회 1,461
17년 전 조회 2,573
17년 전 조회 2,338
17년 전 조회 2,116
17년 전 조회 1,427
17년 전 조회 2,443
17년 전 조회 4,263
17년 전 조회 2,746
17년 전 조회 1,671
17년 전 조회 1,864
17년 전 조회 3,242
17년 전 조회 2,249
17년 전 조회 3,841
17년 전 조회 1,688
17년 전 조회 2,281
17년 전 조회 2,113
17년 전 조회 1,628
17년 전 조회 2,143
17년 전 조회 1,941
17년 전 조회 1,976
17년 전 조회 3,086
17년 전 조회 2,160
17년 전 조회 1,449
17년 전 조회 1,473
17년 전 조회 2,135
17년 전 조회 3,213
17년 전 조회 2,153
17년 전 조회 1,545
17년 전 조회 4,247
17년 전 조회 2,036
17년 전 조회 3,468
17년 전 조회 6,042
17년 전 조회 1,499
17년 전 조회 1,669
17년 전 조회 1,248
17년 전 조회 1,363
17년 전 조회 2,885
17년 전 조회 1,919
17년 전 조회 2,604
🐛 버그신고