A

롤링배너객체 Rolling

· 17년 전 · 2326
------------------------------------- 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,494
17년 전 조회 1,085
17년 전 조회 1,220
17년 전 조회 3,095
17년 전 조회 2,159
17년 전 조회 1,967
17년 전 조회 1,211
17년 전 조회 2,446
17년 전 조회 1,167
17년 전 조회 1,127
17년 전 조회 1,367
17년 전 조회 2,733
17년 전 조회 2,390
17년 전 조회 2,474
17년 전 조회 1,176
17년 전 조회 1,291
17년 전 조회 3,240
17년 전 조회 2,826
17년 전 조회 4,093
17년 전 조회 2,255
17년 전 조회 2,349
17년 전 조회 1,398
17년 전 조회 2,518
17년 전 조회 2,205
17년 전 조회 2,964
17년 전 조회 2,473
17년 전 조회 1,635
17년 전 조회 2,428
17년 전 조회 1,586
17년 전 조회 1,174
17년 전 조회 2,234
17년 전 조회 2,879
17년 전 조회 4,055
17년 전 조회 3,145
17년 전 조회 1,411
17년 전 조회 1,706
17년 전 조회 2,241
17년 전 조회 1,547
17년 전 조회 1,719
17년 전 조회 2,714
17년 전 조회 2,137
17년 전 조회 1,791
17년 전 조회 4,194
17년 전 조회 3,043
17년 전 조회 1,434
17년 전 조회 3,566
17년 전 조회 2,796
17년 전 조회 2,076
17년 전 조회 1,292
17년 전 조회 2,327
17년 전 조회 2,065
17년 전 조회 1,978
17년 전 조회 1,921
17년 전 조회 1,172
17년 전 조회 1,875
17년 전 조회 2,930
17년 전 조회 1,431
17년 전 조회 1,672
17년 전 조회 1,352
17년 전 조회 1,600
17년 전 조회 1,573
17년 전 조회 1,446
17년 전 조회 2,560
17년 전 조회 2,324
17년 전 조회 2,104
17년 전 조회 1,414
17년 전 조회 2,427
17년 전 조회 4,249
17년 전 조회 2,738
17년 전 조회 1,658
17년 전 조회 1,852
17년 전 조회 3,230
17년 전 조회 2,231
17년 전 조회 3,825
17년 전 조회 1,674
17년 전 조회 2,270
17년 전 조회 2,099
17년 전 조회 1,615
17년 전 조회 2,130
17년 전 조회 1,926
17년 전 조회 1,962
17년 전 조회 3,074
17년 전 조회 2,148
17년 전 조회 1,437
17년 전 조회 1,460
17년 전 조회 2,125
17년 전 조회 3,202
17년 전 조회 2,138
17년 전 조회 1,530
17년 전 조회 4,236
17년 전 조회 2,025
17년 전 조회 3,457
17년 전 조회 6,031
17년 전 조회 1,484
17년 전 조회 1,654
17년 전 조회 1,235
17년 전 조회 1,347
17년 전 조회 2,870
17년 전 조회 1,906
17년 전 조회 2,592
🐛 버그신고