웹프로그래밍

Global It Leader!!


jQuery


 
 

로그인창에 아이디 비밀번호란 이미지넣기

페이지 정보

작성자 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 댓글 0건 조회 4,143회 작성일 13-02-10 00:30

본문

안녕하세요..
팁에 찾아보니 없는거 같아서 이렇게 올립니다..
이건  로그인창에  글자 대신 이미지를 넣어서 나오게 하는 방법입니다.

우선 자기 계정에 있는 제로보드를 여시고script폴더를 찾은다음에outlogin_script.php  파일을 찾습니다..
outlogin_script.php  여시고 젤 위에 삽입하세요

<!--로그인전 아이디,패스워드 배경에 이미지 까는 스크립트//-->
<script language="javascript">
        var c=false;
        // 포커스가 인풋 박스안에 있을때 배경이미지 지우기
        function ch (valueid) {
                if(valueid ==  'user_id')  document.zb_login.user_id.style.backgroundImage="";
                else document.zb_login.password.style.backgroundImage="";
                c=true;
        }

        // 포커스가 인풋 박스를 벗어났을때 배경이미지 살리기 (입력값이 있으면 살리지 않기)
        function chout (valueid) {
                if(valueid ==  'user_id') {
                        if(!document.zb_login.user_id.value) document.zb_login.user_id.style.backgroundImage="url(http://이미지경로)"; // 아이디에 쓰일 이미지경로
                }
                else {
                        if(!document.zb_login.password.value) document.zb_login.password.style.backgroundImage="url(http://이미지경로)"; //패스워드 쓰일 이미지경로
                }
                c=true;
        }
function check_keycode(e) {
                if (e.type == "keypress") var whichCode = e.keyCode;
                if (whichCode == 13)
                         chkinput();
        }
</script>

그 다음  해당로그인스킨  login.html 열어 수정합니다. 참고로 아이디,패스워드 이미지경로는 지정해주셔야합니다
우선 아이디부분

<input type="text" name="user_id .....~~~~~> 이렇게 나오는부분이 있을겁니다
이렇게 삽입해주세요  다른스타일을 쓰시는분은  적당히 수정해주세요.. 초보분들은 그냥 붙여넣기만해도 괜찮습니다
<input type="text" name="user_id" tabindex="1" style="width:70; height:20; background-image:url(http://아이디에 쓰일이미지경로);" onkeydown="return ch('user_id');" onmousedown="return ch('user_id');" onfocusout="return chout('user_id')">

그 다음 패스워드부분

<input name="password" type="password".....~~~~> 이렇게 나오는부분을 밑에처럼 수정합니다..

<input name="password" type="password"  tabindex="2" style="width:70; height:20; background-image:url(http://패스워드에 쓰일 이미지경로);" onkeydown="return ch('password');" onmousedown="return ch('password');" onfocusout="return chout('password')" onkeypress=".javascriptcheck_keycode(event);">

이렇게 하면 끝 ...  그리고 아이디이미지와 패스워드 이미지를 첨부 했습니다..
에러나시는분들은  코맨트글을 참고해주세요..

 

댓글목록

등록된 댓글이 없습니다.

전체 142
게시물 검색
jQuery 목록
번호 제목 글쓴이 조회 날짜
82 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3740 01-30
81 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3808 12-23
80 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3394 12-19
79 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3595 12-18
78 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3912 12-09
77 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3627 11-18
76 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3549 09-29
75 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3915 09-19
74 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3570 09-19
73 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3970 09-06
72 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3681 05-20
71 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3630 04-11
70 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3658 03-20
69 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3720 02-27
68 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3711 02-12
열람중 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4144 02-10
66 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3680 02-08
65 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3701 02-08
64 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3679 01-31
63 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4503 01-03