웹프로그래밍

Global It Leader!!


jQuery


 
 

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

페이지 정보

작성자 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 댓글 0건 조회 4,124회 작성일 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 목록
번호 제목 글쓴이 조회 날짜
102 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5047 07-11
101 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3477 06-24
100 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3588 12-22
99 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3776 08-13
98 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3703 08-04
97 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3889 07-17
96 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7297 06-16
95 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3562 06-04
94 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4380 05-20
93 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4612 05-20
92 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3289 05-13
91 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3415 05-12
90 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3361 05-12
89 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3304 05-01
88 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3195 04-23
87 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3339 04-17
86 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3295 02-03
85 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3270 01-12
84 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3277 04-04
83 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3737 01-30