336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

안녕하세요.

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<script>
    window.onload = function(){
    
        window.open("http://jdkblog.tistory.com","프로그래밍 블로그","width=400,height=500");
        //window.open("URL주소","제목","옵션이 들어갈곳");
 
        //옵션
 
        //- fullscreen = 전체 창. (yes/no)(default : no) 
        //- location = 주소창이 활성화. (yes/no)(default : yes) 
        //- menubar = 메뉴바 visible. (yes/no)(default : yes) 
        //- titlebar = 타이틀바. (yes/no)(default : yes) 
        //- toolbar = 툴바. (yes/no)(default : yes) 
        //- resizable = 창 사이즈 변경. (yes/no)(default : yes) 
        //- scrollbars = 스크롤바. (yes/no)(default : yes) 
        //- width = 창 가로 크기 
        //- height = 창 세로 크기 
    }
</script>
cs

 

감사합니다.

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

안녕하세요.

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<script>
    window.onload = function(){
    //EX)필요한 것을 가져다가 붙여넣어서 사용하면 됩니다. ㅎㅎ
 
    alert("필요한 값 : "+document.body.clientWidth);
    // 가로길이
    //document.body.offsetWidth 
    //document.body.scrollWidth // (문서 전체의 크기)
    //document.body.clientWidth // (창의 크기)
    // 세로길이
    //document.body.offsetHeight
    //document.body.scrollHeight //(문서 전체의 크기)
    //document.body.clientHeight // (창의 크기)
 
    /* HTML5 표준이 정해져 있다. */
    // 가로 길이
    //window.innerWidth // 브라우저 윈도우 두께를 제외한 실질적 가로 길이
    //window.outerWidth // 브라우저 윈도우 두께를 포함한 브라우저 전체 가로 길이
    //세로길이
    //window.innerHeight // 브라우저 윈도우 두께를 제외한 실질적 세로 길이
    //window.outerHeight // 브라우저 윈도우 두께를 포함한 브라우저 전체 세로 길이
 
    }
</script>
cs

 

감사합니다.

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

안녕하세요.

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!-- jquery를 불러옵니다. jquery.com download 페이지를 참조해주세요 -->
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
 
<script>
  $(document).ready(function() {
    $('#favorite').on('click'function(e) {
        var bookmarkURL = window.location.href;
        var bookmarkTitle = document.title;
        var triggerDefault = false;
 
        if (window.sidebar && window.sidebar.addPanel) {
            // Firefox version < 23
            window.sidebar.addPanel(bookmarkTitle, bookmarkURL, '');
        } else if ((window.sidebar && (navigator.userAgent.toLowerCase().indexOf('firefox'> -1)) || (window.opera && window.print)) {
            // Firefox version >= 23 and Opera Hotlist
            var $this = $(this);
            $this.attr('href', bookmarkURL);
            $this.attr('title', bookmarkTitle);
            $this.attr('rel''sidebar');
            $this.off(e);
            triggerDefault = true;
        } else if (window.external && ('AddFavorite' in window.external)) {
            // IE Favorite
            window.external.AddFavorite(bookmarkURL, bookmarkTitle);
        } else {
            // WebKit - Safari/Chrome
            alert((navigator.userAgent.toLowerCase().indexOf('mac'!= -1 ? 'Cmd' : 'Ctrl'+ '+D 키를 눌러 즐겨찾기에 등록하실 수 있습니다.');
        }
 
        return triggerDefault;
    });
});
</script>
 
<a href="#" id="favorite" title="즐겨찾기 등록">즐겨찾기</a>
cs

 

감사합니다.

+ Recent posts