사이트 내 전체검색
innerHTML을 이용하여 mnet의 next, pre 효과 내기
로빈아빠
https://cmd.kr/javascript/667 URL이 복사되었습니다.

본문

innerHTML을 이용하여 mnet의 next, pre 효과 내기

첨부파일 처럼 버튼을 누르면 다음 페이지로 iframe의 내용이 변하게 한다.
iframe에서 innerHTML을 이용하여 next, pre 버튼에 주소를 입력하는 방식이다.

b3e01eba_122628625700705
본페이지
<table width="523" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td height="25" align="right" valign="top" background="images/remain/center_09.gif"><span id='prev_lnk'></span><span id='next_lnk'></span>&nbsp;&nbsp;&nbsp;</td>
	</tr>
	<tr>
		<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="2" background="images/remain/center_16.gif"><img src="images/remain/center_16.gif" ></td>
					<td>
						<iframe name="frames" frameborder="0" width="518" height="120" leftmargin="0" marginheight="0" marginwidth="0" scrolling="no" src="frames.html" topmargin="0" allowTransparency="true" style="z-index:2;"></iframe>
					</td>
					<td width="2" background="images/remain/center_16.gif"><img src="images/remain/center_16.gif"></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td><img src="images/remain/center_10.gif" width="523" height="14"></td>
	</tr>
</table><br>


		</td>
    <td width="2" background="images/remain/center_16.gif"><img src="images/remain/center_16.gif"></td>
  </tr>
</table>

	</td>
  </tr>
  <tr>
    <td><img src="images/remain/center_10.gif" width="523" height="14"></td>
  </tr>
</table><br>


iframe 페이지
// 중략
<?
$end = ceil($totalList/$scale1);

if($cpage1=='1') {
	$prev_page = "<img src='images/remain/right_14.gif' name='Image122' border='0'>";
} else {
	$page = $cpage1-1;
	$prev_page = "<a href='frames.html?cpage1=$page' onMouseOut='MM_swapImgRestore()' onMouseOver=\\\"MM_swapImage('Image122','','images/remain/right_14_1.gif',1)\\\" onfocus='this.blur()' target='promotion'><img src='images/remain/right_14.gif' name='Image122' border='0'></a>";
}
if($cpage1==$end) {
	$next_page = "<img src='images/remain/right_15_1.gif' name='Image123' border='0'>";
} else {
	$page = $cpage1+1;
	$next_page = "<a href='frames.html?bunryu1=cpage1=$page' onMouseOut='MM_swapImgRestore()' onMouseOver=\\\"MM_swapImage('Image123','','images/remain/right_15.gif',1)\\\" onfocus='this.blur()' target='promotion'><img src='images/remain/right_15_1.gif' name='Image123' border='0'></a>";
}

?>
<script language="javascript">
		parent.document.getElementById("prev_lnk").innerHTML = "<?=$prev_page?>";
		parent.document.getElementById("next_lnk").innerHTML = "<?=$next_page?>";
</script>

댓글목록

등록된 댓글이 없습니다.

831 (3/17P)

Search

Copyright © Cmd 명령어 52.14.88.137