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. 27
    Mar 2010
    08:22

    [JavaScript] 자바스크립트 함수 총정리!!

    Category컴퓨터잡담 Views12514
    Read More
  2. 27
    Mar 2010
    11:13

    ajax의 XMLHttpRequest 객체

    Category컴퓨터잡담 Views7463
    Read More
  3. 27
    Mar 2010
    12:51

    Prototype.js를 제대로 사용하는 방법

    Category컴퓨터잡담 Views10299
    Read More
  4. 29
    Mar 2010
    15:04

    50 개 이상의 Ajax 예제들

    Category컴퓨터잡담 Views18950
    Read More
  5. 29
    Mar 2010
    15:04

    50 개 이상의 Ajax 예제들

    Category컴퓨터잡담 Views18179
    Read More
  6. 01
    Apr 2010
    13:18

    php에서 script로 변수 전달 후 html에 div로 내용 출력하기

    Category컴퓨터잡담 Views15901
    Read More
  7. 03
    Apr 2010
    13:32

    부팅시 에러 메시지 PRESS F1 to REsume

    Category컴퓨터잡담 Views16103
    Read More
  8. 05
    Apr 2010
    16:43

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

    Category컴퓨터잡담 Views10966
    Read More
  9. 06
    Apr 2010
    12:25

    MySQL을 위한 하드웨어 최적화(What one can and should optimize)

    Category컴퓨터잡담 Views13123
    Read More
  10. 07
    Apr 2010
    11:28

    MYSQL my.cnf 최적화

    Category컴퓨터잡담 Views22600
    Read More
  11. 09
    Apr 2010
    07:51

    삼성, 프로그래머들에게 스마트폰 콘텐츠 개발하고 싶게 만들어라.

    Category컴퓨터잡담 Views10989
    Read More
  12. 10
    Apr 2010
    13:49

    쓸데없는 시작 프로그램을 없애자

    Category컴퓨터잡담 Views6107
    Read More
  13. 13
    Apr 2010
    17:12

    MYSQL Qcache 값 조정~~~

    Category컴퓨터잡담 Views19554
    Read More
  14. 13
    Apr 2010
    19:01

    mysql threads_created 뭐냥?

    Category컴퓨터잡담 Views12244
    Read More
  15. 14
    Apr 2010
    11:50

    svchost.exe 프로세스로 내컴퓨터 최적화 시키기

    Category컴퓨터잡담 Views7366
    Read More
  16. 14
    Apr 2010
    14:31

    MySQL 조율(튜닝)에 대해

    Category컴퓨터잡담 Views15804
    Read More
  17. 19
    Apr 2010
    09:40

    MySQL FEDERATED / InnoDB is disabled, myint64.dll 오류 어찌하오리

    Category컴퓨터잡담 Views27707
    Read More
  18. 20
    Apr 2010
    11:17

    서버에 SSD 교체 작업을 해야되나?

    Category컴퓨터잡담 Views6521
    Read More
  19. 20
    Apr 2010
    18:42

    DB MyISAM, InnoDB 입출력 처리방식

    Category컴퓨터잡담 Views13812
    Read More
  20. 21
    Apr 2010
    10:15

    블로그/사이트의 키워드 훔쳐보기^^;;

    Category컴퓨터잡담 Views9206
    Read More
Board Pagination Prev 1 ... 3 4 5 6 7 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소