천

퇴장시 팝업창 한번한 띄우기 입니다.

· 2016-01-22 (금) 13:20:59 · 2564

<html>
<head>
<script language="JavaScript">
<!--
function Cookie(document, name, hours, path, domain, secure) {
    this.$document = document;
    this.$name = name;
    if (hours)
        this.$expiration = new Date((new Date()).getTime() + hours*3600000);
    else
        this.$expiration = null;
    if (path) this.$path = path; else this.$path = null;
    if (domain) this.$domain = domain; else this.$domain = null;
    if (secure) this.$secure = true; else this.$secure = false;
}

function _Cookie_store() {
    var cookieval = "";
    for(var prop in this) {

        if ((prop.charAt(0) == '$') || ((typeof this[prop]) == 'function'))
            continue;
        if (cookieval != "") cookieval += '&';
        cookieval += prop + ':' + escape(this[prop]);
    }

    var cookie = this.$name + '=' + cookieval;
    if (this.$expiration)
        cookie += '; expires=' + this.$expiration.toGMTString();
    if (this.$path) cookie += '; path=' + this.$path;
    if (this.$domain) cookie += '; domain=' + this.$domain;
    if (this.$secure) cookie += '; secure';

    this.$document.cookie = cookie;
}

function _Cookie_load() {
    var allcookies = this.$document.cookie;
    if (allcookies == "") return false;

    var start = allcookies.indexOf(this.$name + '=');
    if (start == -1) return false; 
    start += this.$name.length + 1; 
    var end = allcookies.indexOf(';', start);
    if (end == -1) end = allcookies.length;
    var cookieval = allcookies.substring(start, end);

    var a = cookieval.split('&'); 
    for(var i=0; i < a.length; i++)
        a[i] = a[i].split(':');

    for(var i = 0; i < a.length; i++) {
        this[a[i][0]] = unescape(a[i][1]);
    }
    return true;
}

function _Cookie_remove() {
    var cookie;
    cookie = this.$name + '=';
    if (this.$path) cookie += '; path=' + this.$path;
    if (this.$domain) cookie += '; domain=' + this.$domain;
    cookie += '; expires=Fri, 31-Jan-2001 00:00:00 GMT';

    this.$document.cookie = cookie;
}

new Cookie();
Cookie.prototype.store = _Cookie_store;
Cookie.prototype.load = _Cookie_load;
Cookie.prototype.remove = _Cookie_remove;

function Popup(site) {
    var exp = 8760;
    var page = "http://www.yahoo.co.kr"; // 사이트 주소
    var windowprops = "width=300,height=300,location=no,toolbar=no,menubar=no,scrollbars=no"; // 옵션 설정
    var temp = new Cookie(document, "nanumi", exp);

    if (!temp.load()) {
        temp.firstload = site;
        temp.store();
            subwin=window.open(page, "", windowprops);
    }
}
-->
</script>
</head>

<body onunLoad="Popup('nanumi');">

팝업창을 최초 접속시 딱 한번만 띄웁니다.. 팝업창이 뜨는걸 확인하셨다면 팝업창을 닫고 본 페이지를 새로고침 해보세요.. 더 이상 팝업이 실행되지 않습니다.

</body>
</html> 

|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,188건
+
제목 글쓴이 날짜 조회
16-06-30 조회 2,774
16-05-11 조회 3,019
16-03-21 조회 3,112
16-03-19 조회 3,067
16-03-17 조회 2,889
16-03-17 조회 2,975
16-03-14 조회 2,989
16-03-13 조회 2,915
16-03-09 조회 3,348
16-03-08 조회 2,996
16-03-08 조회 2,807
16-03-08 조회 2,823
16-03-08 조회 2,975
16-03-07 조회 2,773
16-03-07 조회 2,773
16-02-29 조회 3,170
16-02-25 조회 3,158
16-02-22 조회 2,968
16-02-12 조회 3,253
16-02-04 조회 3,090
16-02-04 조회 3,354
16-02-04 조회 2,979
16-02-03 조회 3,158
16-02-03 조회 2,974
16-02-02 조회 2,926
16-02-02 조회 2,808
16-02-01 조회 2,819
16-01-30 조회 2,649
16-01-30 조회 2,832
16-01-30 조회 2,931
16-01-30 조회 2,753
16-01-29 조회 2,636
16-01-28 조회 2,932
16-01-28 조회 2,575
16-01-27 조회 2,538
16-01-26 조회 2,500
16-01-26 조회 2,593
16-01-25 조회 2,568
16-01-22 조회 2,546
16-01-22 조회 2,621
16-01-21 조회 2,526
16-01-19 조회 2,434
16-01-19 조회 2,489
16-01-18 조회 2,458
16-01-17 조회 2,630
16-01-14 조회 2,568
16-01-13 조회 2,747
16-01-12 조회 2,687
16-01-12 조회 2,608
16-01-11 조회 2,561
15-12-30 조회 3,180
15-12-29 조회 2,563
15-12-28 조회 2,590
15-12-09 조회 2,663
15-12-08 조회 2,872
15-12-08 조회 2,620
15-12-08 조회 2,898
15-12-07 조회 2,701
15-12-07 조회 3,069
15-12-07 조회 2,729
15-12-06 조회 2,860
15-12-06 조회 2,564
15-12-06 조회 2,784
15-12-05 조회 2,716
15-12-05 조회 2,972
15-12-05 조회 2,765
15-12-04 조회 2,624
15-12-04 조회 2,737
15-12-04 조회 2,785
15-12-03 조회 2,744
15-12-03 조회 2,777
15-12-03 조회 2,790
15-12-02 조회 2,883
15-12-02 조회 2,820
15-12-02 조회 2,950
15-12-02 조회 2,998
15-12-01 조회 2,713
15-12-01 조회 2,509
15-12-01 조회 2,582
15-11-30 조회 2,779
15-11-30 조회 2,917
15-11-30 조회 2,833
15-11-29 조회 2,604
15-11-29 조회 2,841
15-11-29 조회 2,664
15-11-28 조회 2,603
15-11-28 조회 2,618
15-11-28 조회 2,664
15-11-27 조회 2,757
15-11-27 조회 2,605
15-11-27 조회 2,616
15-11-25 조회 2,684
15-11-25 조회 2,746
15-11-25 조회 2,543
15-11-23 조회 2,820
15-11-23 조회 2,953
15-11-23 조회 2,793
15-11-21 조회 2,688
15-11-21 조회 2,587
15-11-21 조회 2,532