A

롤링배너객체 Rolling

· 17년 전 · 2745
------------------------------------- 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,930
17년 전 조회 1,506
17년 전 조회 1,656
17년 전 조회 3,580
17년 전 조회 2,602
17년 전 조회 2,396
17년 전 조회 1,652
17년 전 조회 2,881
17년 전 조회 1,597
17년 전 조회 1,573
17년 전 조회 1,831
17년 전 조회 3,171
17년 전 조회 2,840
17년 전 조회 2,930
17년 전 조회 1,620
17년 전 조회 1,747
17년 전 조회 3,716
17년 전 조회 3,273
17년 전 조회 4,535
17년 전 조회 2,702
17년 전 조회 2,803
17년 전 조회 1,853
17년 전 조회 2,945
17년 전 조회 2,652
17년 전 조회 3,421
17년 전 조회 2,914
17년 전 조회 2,068
17년 전 조회 2,856
17년 전 조회 1,997
17년 전 조회 1,595
17년 전 조회 2,674
17년 전 조회 3,288
17년 전 조회 4,498
17년 전 조회 3,572
17년 전 조회 1,850
17년 전 조회 2,063
17년 전 조회 2,648
17년 전 조회 1,954
17년 전 조회 2,157
17년 전 조회 3,112
17년 전 조회 2,554
17년 전 조회 2,207
17년 전 조회 4,636
17년 전 조회 3,432
17년 전 조회 1,841
17년 전 조회 3,986
17년 전 조회 3,224
17년 전 조회 2,470
17년 전 조회 1,725
17년 전 조회 2,746
17년 전 조회 2,473
17년 전 조회 2,401
17년 전 조회 2,356
17년 전 조회 1,582
17년 전 조회 2,279
17년 전 조회 3,327
17년 전 조회 1,813
17년 전 조회 2,083
17년 전 조회 1,761
17년 전 조회 2,014
17년 전 조회 1,980
17년 전 조회 1,883
17년 전 조회 2,971
17년 전 조회 2,726
17년 전 조회 2,524
17년 전 조회 1,815
17년 전 조회 2,854
17년 전 조회 4,659
17년 전 조회 3,150
17년 전 조회 2,079
17년 전 조회 2,257
17년 전 조회 3,674
17년 전 조회 2,669
17년 전 조회 4,230
17년 전 조회 2,078
17년 전 조회 2,665
17년 전 조회 2,522
17년 전 조회 2,033
17년 전 조회 2,530
17년 전 조회 2,363
17년 전 조회 2,378
17년 전 조회 3,507
17년 전 조회 2,568
17년 전 조회 1,839
17년 전 조회 1,865
17년 전 조회 2,535
17년 전 조회 3,614
17년 전 조회 2,528
17년 전 조회 1,954
17년 전 조회 4,656
17년 전 조회 2,433
17년 전 조회 3,889
17년 전 조회 6,435
17년 전 조회 1,883
17년 전 조회 2,061
17년 전 조회 1,632
17년 전 조회 1,741
17년 전 조회 3,278
17년 전 조회 2,321
17년 전 조회 2,968