이게 왜 작동을 안할까요 ㅠㅠ

<script type="text/javascript">
onscroll = function() {
  var searchform = document.getElementById("searchform");
  var scrollsurvey = document.documentElement.scrollTop || document.body.scrollTop;
  searchform = scrollsurvey > 50 ?
  searchform || (searchform.style.visibility="visible", true)
    : searchform && (searchform.style.visibility="hidden", false);
};
</script>

저로써는 당최 알수가 없네요 ㅠㅠ
원래대로라면 스크롤이 50px 이상 되었을 때에는
searchform DIV 레이어가 hidden 에서 visible 이 되면서
화면에 나타나야 하는데 ㅠㅠ


|

댓글 2개

음전체적인 소스를 봐야 할꺼같지만 onscroll 이벤트가 실행되는 구간도 보여주셨으면... 그리고 로그기록도 보여주시면 좋겠는데
두번째 줄에서 searchform 이 폼 object로 설정이 되었지만 4번째 줄에서는 searchform이 integer값이 되었습니다. 따라서 searchform.style.visibility란 존재하지 않습니다.
댓글을 작성하시려면 로그인이 필요합니다.

자유게시판

+
제목 글쓴이 날짜 조회
12년 전 조회 1,108
12년 전 조회 844
12년 전 조회 1,155
12년 전 조회 1,130
12년 전 조회 1,458
12년 전 조회 1,109
12년 전 조회 2,915
12년 전 조회 1,155
12년 전 조회 1,169
12년 전 조회 1,423
12년 전 조회 2,008
12년 전 조회 1,111
12년 전 조회 2,626
12년 전 조회 1,670
12년 전 조회 1,119
12년 전 조회 1,821
12년 전 조회 1,447
12년 전 조회 1,834
12년 전 조회 1,653
12년 전 조회 1,106
12년 전 조회 1,447
12년 전 조회 1,421
12년 전 조회 1,210
12년 전 조회 1,821
12년 전 조회 1,311
12년 전 조회 1,123
12년 전 조회 2,159
12년 전 조회 1,155
12년 전 조회 1,650
12년 전 조회 911