ASP 소스를 PHP 소스로 바꿔주세요~~ > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

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

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

본문

<%
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로 사용하려면
코드를 어떻게 수정하면 될까요? 도와주세요.
  • 복사

댓글 전체

<%
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?>);">
© SIRSOFT
현재 페이지 제일 처음으로