천

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

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

<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,187건
+
제목 글쓴이 날짜 조회
16-02-06 조회 3,662
16-02-04 조회 3,214
16-02-04 조회 3,506
16-02-04 조회 3,317
16-02-03 조회 3,276
16-02-03 조회 3,016
16-02-03 조회 3,067
16-02-03 조회 2,979
16-02-03 조회 3,095
16-02-02 조회 3,134
16-02-02 조회 3,032
16-02-02 조회 3,054
16-02-02 조회 2,938
16-02-02 조회 3,357
16-02-01 조회 2,943
16-02-01 조회 2,741
16-02-01 조회 2,723
16-01-31 조회 2,755
16-01-31 조회 2,764
16-01-31 조회 2,773
16-01-30 조회 3,179
16-01-30 조회 2,764
16-01-30 조회 2,745
16-01-30 조회 2,942
16-01-30 조회 3,121
16-01-30 조회 2,888
16-01-29 조회 2,752
16-01-29 조회 2,757
16-01-29 조회 2,641
16-01-29 조회 2,625
16-01-28 조회 3,147
16-01-28 조회 2,956
16-01-28 조회 2,567
16-01-28 조회 2,481
16-01-28 조회 2,731
16-01-27 조회 2,660
16-01-27 조회 2,646
16-01-27 조회 2,646
16-01-26 조회 2,645
16-01-26 조회 2,627
16-01-26 조회 2,635
16-01-26 조회 2,980
16-01-25 조회 2,655
16-01-25 조회 2,694
16-01-25 조회 2,710
16-01-25 조회 2,573
16-01-24 조회 2,567
16-01-24 조회 2,567
16-01-24 조회 2,485
16-01-23 조회 2,529
16-01-23 조회 2,544
16-01-23 조회 2,528
16-01-22 조회 2,663
16-01-22 조회 2,816
16-01-22 조회 2,684
16-01-22 조회 2,776
16-01-21 조회 3,020
16-01-21 조회 2,665
16-01-21 조회 2,646
16-01-21 조회 2,654
16-01-21 조회 2,617
16-01-20 조회 2,661
16-01-20 조회 2,582
16-01-20 조회 2,525
16-01-20 조회 2,731
16-01-19 조회 2,555
16-01-19 조회 2,607
16-01-19 조회 2,578
16-01-19 조회 2,617
16-01-19 조회 2,804
16-01-18 조회 2,592
16-01-18 조회 2,578
16-01-18 조회 2,592
16-01-18 조회 2,743
16-01-17 조회 2,771
16-01-17 조회 2,627
16-01-17 조회 2,694
16-01-16 조회 2,532
16-01-16 조회 2,463
16-01-16 조회 2,526
16-01-15 조회 2,688
16-01-15 조회 2,688
16-01-15 조회 2,602
16-01-15 조회 2,536
16-01-14 조회 2,695
16-01-14 조회 2,835
16-01-14 조회 3,293
16-01-14 조회 2,597
16-01-14 조회 2,834
16-01-14 조회 2,615
16-01-13 조회 3,055
16-01-13 조회 2,674
16-01-13 조회 2,639
16-01-13 조회 2,670
16-01-13 조회 2,566
16-01-12 조회 3,015
16-01-12 조회 2,731
16-01-12 조회 2,744
16-01-12 조회 2,665
16-01-11 조회 2,800