테스트 사이트 - 개발 중인 베타 버전입니다

ASP 소스를 PHP 소스로 바꿔주세요~~

· 13년 전 · 751 · 1
<%
bottom_width = request("bottomwidth")
''''''''' 초기화
if bottom_width = "" then
bottom_width = 0 end if
%>

<SCRIPT LANGUAGE="JavaScript">
<!-- function loadScroll(aaa)
{
window.scrollTo(aaa,0);
} function up ()
{
aaa=document.body.scrollLeft; //현재 스크롤 위치 기억
location.href="가고자하는페이지.asp?bottomwidth="+aaa;
} //-->
</SCRIPT>
<body onload="javascript:loadScroll(<%=bottom_width%>);">
<table width=10000>
<tr >
<td title="순서를 한단계 위로 올립니다">
<a href="javascript:up();">다른페이지 가기
</td>
</tr>
</table>

다른페이지로 이동했다 다시 원래페이지로 올때 넘어가기전의 스크롤 위치(width) 에
스크롤이 위치하도록 하는 소스인데, ASP로 되어 있습니다. 이를 PHP로 사용하려면
코드를 어떻게 수정하면 될까요? 도와주세요.

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 1개

13년 전
<%
bottom_width = request("bottomwidth")
''''''''' 초기화
if bottom_width = "" then
bottom_width = 0 end if
%>

php는

<?
$bottom_width = $_REQUEST[bottomwidth];
........초기화
if($bottom_width == ""){
$bottom_width=0;
}
?>

<body onload="javascript:loadScroll(<%=bottom_width%>);">
이부분은
<body onload="javascript:loadScroll(<?=$bottom_width?>);">

게시글 목록

번호 제목
284508
284499
284492
284490
284484
284481
284478
284476
284474
284472
284470
284458
284457
284454
284453
284447
284446
284444
284441
284440