Skip to content
컴퓨터잡담
2010.04.05 16:43

로그인 아이디 쿠키로 기억하기

조회 수 10966 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

로그인 아이디 쿠키로 기억하기


아직 테스트 해보진 못했네요. ㅋ;


출처 : http://jsguide.net/ver2/examples/index.php?mode=view&category=7&qstr=&uid=176&page=1


<html> <head> <script language="javascript"> function setCookie (name, value, expires) { document.cookie = name + "=" + escape (value) + "; path=/; expires=" + expires.toGMTString(); } function getCookie(Name) { var search = Name + "=" if (document.cookie.length > 0) { // 쿠키가 설정되어 있다면 offset = document.cookie.indexOf(search) if (offset != -1) { // 쿠키가 존재하면 offset += search.length // set index of beginning of value end = document.cookie.indexOf(";", offset) // 쿠키 값의 마지막 위치 인덱스 번호 설정 if (end == -1) end = document.cookie.length return unescape(document.cookie.substring(offset, end)) } } return ""; } function saveid(form) { var expdate = new Date(); // 기본적으로 30일동안 기억하게 함. 일수를 조절하려면 * 30에서 숫자를 조절하면 됨 if (form.checksaveid.checked) expdate.setTime(expdate.getTime() + 1000 * 3600 * 24 * 30); // 30일 else expdate.setTime(expdate.getTime() - 1); // 쿠키 삭제조건 setCookie("saveid", form.id.value, expdate); } function getid(form) { form.checksaveid.checked = ((form.id.value = getCookie("saveid")) != ""); } </script> </head> <body onLoad="getid(document.mainform)"> <form name=mainform> 아이디 <input type=text name=id> 암호 <input type=password name=pw> <input type=checkbox name=checksaveid onClick="saveid(this.form)">아이디 기억 </form> </body> </html>

로그인 후 댓글쓰기가 가능합니다.

?

  1. 29
    Sep 2010
    18:46

    그림안에 투명텍스트박스 넣기.

    Category컴퓨터잡담 Views9564
    Read More
  2. 01
    Oct 2010
    11:30

    스누피 고스트

    Category컴퓨터잡담 Views6031
    Read More
  3. 01
    Oct 2010
    15:12

    -응답없음- 으로 멈춰버린 프로그램 대기시간 줄이는 방법

    Category컴퓨터잡담 Views7867
    Read More
  4. 01
    Oct 2010
    15:17

    인터넷익스플로러 로딩속도 빠르게 하는방법

    Category컴퓨터잡담 Views12097
    Read More
  5. 02
    Oct 2010
    11:01

    autohotkey 변수의 이해

    Category컴퓨터잡담 Views20657
    Read More
  6. 02
    Oct 2010
    13:23

    램디스크 숨기는 방법

    Category컴퓨터잡담 Views5671
    Read More
  7. 02
    Oct 2010
    13:31

    레지스트리 컨트롤로 XP의 가상메모리 페이징 파일의 강제 자동설정을 끌 수 있는 방법

    Category컴퓨터잡담 Views9098
    Read More
  8. 04
    Oct 2010
    08:25

    [엑셀] 와일드카드 문자의 변환처리 방법

    Category컴퓨터잡담 Views10961
    Read More
  9. 09
    Oct 2010
    12:54

    [엑셀] SUMPRODUCT 함수 이용, 조건에 따른 중복항목 제외 후 카운트하는 함수

    Category컴퓨터잡담 Views14586
    Read More
  10. 10
    Oct 2010
    23:49

    자바스크립트로 전송(submit) 버튼 누르기

    Category컴퓨터잡담 Views103644
    Read More
  11. 10
    Oct 2010
    23:51

    [javascript_tip]자바스크립트 값 넘기기

    Category컴퓨터잡담 Views18961
    Read More
  12. 11
    Oct 2010
    00:05

    javascript만으로 폼전송

    Category컴퓨터잡담 Views13313
    Read More
  13. 11
    Oct 2010
    17:32

    Autohotkey 파일 저장시 한글 깨짐 현상

    Category컴퓨터잡담 Views11179
    Read More
  14. 25
    Oct 2010
    18:18

    레지스트리 팁 - 로그오프하지 않고 반영하기

    Category컴퓨터잡담 Views5297
    Read More
  15. 30
    Oct 2010
    08:15

    북마크 링크 주소모음

    Category컴퓨터잡담 Views102969
    Read More
  16. 01
    Nov 2010
    08:57

    서비스팩3 설치 후 Client Session manager 문제, SM00905 오류 해결방법

    Category컴퓨터잡담 Views14407
    Read More
  17. 03
    Nov 2010
    12:07

    Windows XP 인증방법 개선으로 업데이트 기능 정상 사용하기

    Category컴퓨터잡담 Views6590
    Read More
  18. 10
    Nov 2010
    23:14

    emule 서버리스트

    Category컴퓨터잡담 Views43048
    Read More
  19. 11
    Nov 2010
    17:58

    토렌트 다운로드한 파일이 실행되지 않을경우

    Category컴퓨터잡담 Views5406
    Read More
  20. 15
    Nov 2010
    08:09

    [충격 ] PHP는 Win32 플랫폼의 COM과 DCOM 객체에 접근할수 있습니다.

    Category컴퓨터잡담 Views10336
    Read More
Board Pagination Prev 1 ... 7 8 9 10 11 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소