GNUAPP

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

댓글 1개

<%
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?>);">
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
14년 전 조회 552
14년 전 조회 3,788
14년 전 조회 1,538
14년 전 조회 852
14년 전 조회 748
14년 전 조회 951
14년 전 조회 1,617
14년 전 조회 957
14년 전 조회 699
14년 전 조회 783
14년 전 조회 1,234
14년 전 조회 1,711
14년 전 조회 749
14년 전 조회 1,314
14년 전 조회 1,740
14년 전 조회 1,086
14년 전 조회 736
14년 전 조회 743
14년 전 조회 1,332
14년 전 조회 795
🐛 버그신고