COMING SOON 🚀

페이지 경고창 없애고 무한 롤링

· 13년 전 · 2093
안녕하세요?
 
고수님분들에게 가르침 받고자 합니다.
이제 홈페이지 공부 시작한 일인 입니다.
 
자스인데요
혼자 해결하지를 못해 여기에 질문 올립니다.
 
1~6까지 도달하면 다시 1번으로 갓음 하거든요
그리고 1번에서도 6번으로
한마디로
페이지 경고창 없애고 무한 롤링
하고 싶습니다.
 
 
<script type="text/javascript">
<!--
var pst = 1;// 초기 이미지 페이지 위치(변경 가능)
var img_src = new Array();
// img_src 를 원하는 이미지 경로로 변경(규칙 없음, 갯수를 늘려도 상관 없음)
img_src[0] = './img/p_1.jpg';
img_src[1] = './img/p_2.jpg';
img_src[2] = './img/p_3.jpg';
img_src[3] = './img/p_4.jpg';
img_src[4] = './img/p_5.jpg';
img_src[5] = './img/p_6.jpg';
img_src[6] = './img/p_7.jpg';
img_src[7] = './img/p_8.jpg';
img_src[8] = './img/p_9.jpg';
img_src[9] = './img/p_10.jpg';
img_src[10] = './img/p_11.jpg';
img_src[11] = './img/p_12.jpg';
var img_link = new Array();
// img_link 를 원하는 이동 주소로 변경(규칙 없음, 갯수를 늘려도 상관 없음)
img_link[0] = '/bbs/board.php?bo_table=pro_notice1';
img_link[1] = '/bbs/board.php?bo_table=pro_notice2';
img_link[2] = '/bbs/board.php?bo_table=pro_notice3';
img_link[3] = '/bbs/board.php?bo_table=pro_notice4';
img_link[4] = '/bbs/board.php?bo_table=pro_notice5';
img_link[5] = '/bbs/board.php?bo_table=pro_notice6';
img_link[6] = '/bbs/board.php?bo_table=pro_notice7';
img_link[7] = '/bbs/board.php?bo_table=pro_notice8';
img_link[8] = '/bbs/board.php?bo_table=pro_notice9';
img_link[9] = '/bbs/board.php?bo_table=pro_notice10';
img_link[10] = '/bbs/board.php?bo_table=pro_notice11';
img_link[11] = '/bbs/board.php?bo_table=pro_notice12';
function roll_img(typ) {
   pst = eval(pst + typ + 1);
   var cnt = pst * obL;
   if (pst <= 0)
   {
      alert("첫 페이지입니다!");
      pst = 1;
      cnt = 0;
   }
   else if (pst > lmt)
   {
      alert("페이지 갯수(" + lmt + ")를 초과하였습니다.");
      pst = lmt;
      cnt = pst * obL;
   }
   else {
      for (var i=0, p=cnt-obL; i<obL; i++, p++)
      {
         var img_src_parse = img_src[p].split("/");
         var img_name = img_src_parse[img_src_parse.length-1];//경로를 제외한 이미지 이름
         obj1[i].src = img_src[p];
         obj1[i].alt = img_name;
         obj2[i].href = img_link[p];
      }
   }
}
function set_imglink() {
   var cnt = pst * obL;
   for (var i=0, p=cnt-obL; i<obL; i++, p++)
   {
      var img_src_parse = img_src[p].split("/");
      var img_name = img_src_parse[img_src_parse.length-1];//경로를 제외한 이미지 이름
      obj1[i].src = img_src[p];
      obj1[i].alt = img_name;
      obj2[i].href = img_link[p];
   }
}
//-->
</script>
<table>
<tr>
<td align=center >
<div align="right"><span onClick="roll_img('-')" style="cursor:pointer"><img src=img/left_cusor.jpg></span><span onClick="roll_img('+')" style="cursor:pointer"><img src=img/right_cusor.jpg></span></div>
<table border="0" cellspacing="0" cellpadding="2" id="tbl[]" name="tbl[]">
<tr align="center">
<td width="300" height="100"><a name="r_link[]" target="_self"><img name="r_img[]" border="0"></a></td>
</tr>
<tr align="center">
<td width="300" height="100"><a name="r_link[]" target="_self"><img name="r_img[]" border="0"></a></td>
</tr>
</table>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
var obj1 = document.getElementsByName("r_img[]");
var obj2 = document.getElementsByName("r_link[]");
var obL = obj1.length;
var imL = img_src.length;
var lmt = parseInt(imL / obL);// 이미지 페이지 갯수
set_imglink();
//-->
</script>
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
13년 전 조회 2,053
13년 전 조회 1,982
13년 전 조회 3,342
13년 전 조회 2,164
13년 전 조회 2,106
13년 전 조회 3,195
13년 전 조회 2,870
13년 전 조회 7,596
13년 전 조회 2,485
13년 전 조회 1,851
13년 전 조회 1,643
13년 전 조회 2,026
13년 전 조회 2,123
13년 전 조회 2,006
13년 전 조회 1,819
13년 전 조회 2,193
13년 전 조회 2,499
13년 전 조회 1,923
13년 전 조회 1,710
13년 전 조회 2,186
13년 전 조회 2,674
13년 전 조회 1,983
13년 전 조회 3,312
13년 전 조회 2,219
13년 전 조회 1,843
13년 전 조회 2,348
13년 전 조회 2,532
13년 전 조회 2,643
13년 전 조회 1,686
13년 전 조회 2,504
13년 전 조회 2,122
13년 전 조회 3,635
13년 전 조회 2,138
13년 전 조회 2,039
13년 전 조회 1,899
13년 전 조회 2,303
13년 전 조회 1,900
13년 전 조회 2,696
13년 전 조회 2,234
13년 전 조회 1,873
13년 전 조회 1,837
13년 전 조회 8,399
13년 전 조회 1,898
13년 전 조회 1,783
13년 전 조회 3,039
13년 전 조회 2,799
13년 전 조회 2,013
13년 전 조회 1,668
13년 전 조회 2,429
13년 전 조회 2,094
13년 전 조회 2,236
13년 전 조회 4,201
13년 전 조회 1,902
13년 전 조회 1,837
13년 전 조회 3,639
13년 전 조회 2,033
13년 전 조회 1,879
13년 전 조회 2,707
13년 전 조회 2,746
13년 전 조회 1,996
13년 전 조회 1,788
13년 전 조회 2,532
13년 전 조회 1,955
13년 전 조회 2,318
13년 전 조회 1,852
13년 전 조회 2,124
13년 전 조회 1,843
13년 전 조회 1,836
13년 전 조회 1,763
13년 전 조회 2,915
13년 전 조회 1,891
13년 전 조회 2,695
13년 전 조회 1,895
13년 전 조회 1,778
13년 전 조회 1,704
13년 전 조회 2,053
13년 전 조회 1,854
13년 전 조회 1,812
13년 전 조회 1,856
13년 전 조회 2,456
13년 전 조회 1,933
13년 전 조회 2,384
13년 전 조회 5,349
13년 전 조회 2,090
13년 전 조회 3,496
13년 전 조회 2,444
13년 전 조회 2,675
13년 전 조회 1,780
13년 전 조회 1,798
13년 전 조회 7,084
13년 전 조회 2,082
13년 전 조회 2,209
13년 전 조회 6,027
13년 전 조회 2,728
13년 전 조회 3,558
13년 전 조회 2,952
13년 전 조회 2,144
13년 전 조회 2,213
13년 전 조회 2,146
13년 전 조회 1,826