Global It Leader!!



 
 

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

페이지 정보

작성자 no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 댓글 0건 조회 6,281회 작성일 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);">

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

 

댓글목록

등록된 댓글이 없습니다.

전체 112
게시물 검색
컴퓨터언어 목록
번호 제목 글쓴이 조회 날짜
72 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4658 05-20
71 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4401 04-11
70 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4538 03-20
69 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4461 02-27
68 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4516 02-12
열람중 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6282 02-10
66 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4565 02-08
65 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4509 02-08
64 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4596 01-31
63 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4819 01-03
62 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4727 11-29
61 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6421 09-17
60 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5816 08-21
59 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5968 08-21
58 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6760 07-13
57 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6334 06-13
56 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 5944 04-28
55 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 8090 04-24
54 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7603 04-24
53 Javasript no_profile 오원장 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6361 04-24