(function($) {
    $(function () {
        $(window).load(function () {
            popupAutoResize(); //팝업리사이징
        });
    });
 
    function popupAutoResize() { //팝업리사이징
        var w = $('body > div > div').innerWidth();
        var h = $('body > div > div').innerHeight();
        //window.resizeTo(w, h);
 
        var mw = window.outerWidth - window.innerWidth;
        var mh = window.outerHeight - window.innerHeight;
        
  // window.resizeBy(mw, mh);
        window.resizeTo(w + mw, h + mh);
        if (msieversion() < 9 && msieversion() != 0) {
            mw = $(document).outerWidth() - $(window).width();
            mh = $(document).outerHeight() - $(window).height();
            window.resizeBy(mw, mh);
        }
    }
    function msieversion() { // 익스버전체크
        var ua = window.navigator.userAgent
        var msie = ua.indexOf ( "MSIE " )
        if ( msie > 0 ) // If Internet Explorer, return version number
            return parseInt (ua.substring (msie+5, ua.indexOf (".", msie )))
        else // If another browser, return 0
            return 0
    }
 
})(jQuery);
블로그 이미지

디츠

“말은 쉽지, 코드를 보여줘.” “Talk is cheap. Show me the code.” – 리누스 토르발스(Linus Torvalds)

,

jQuery-File-Upload.zip
다운로드

출처 : http://hayageek.com/docs/jquery-upload-file.php
블로그 이미지

디츠

“말은 쉽지, 코드를 보여줘.” “Talk is cheap. Show me the code.” – 리누스 토르발스(Linus Torvalds)

,
$('a').bind('click',function(){
	var url = ($(this).attr('href'));
	var cat = getURLParameter(url, 'cat');
	var typ = getURLParameter(url, 'typ');
	//calling the ajax function
	pop(cat, typ)
});

function getURLParameter(url, name) {
	return (RegExp(name + '=' + '(.+?)(&|$)').exec(url)||[,null])[1];
}

'javascript, jquery' 카테고리의 다른 글

창 크기에 맞게 리사이징  (0) 2015.09.25
jquery - ajax 파일 업로드  (0) 2015.09.19
url 주소를 클립보드로 복사하기  (0) 2015.09.16
엔터(enter) 입력시 폼(form) 전송  (0) 2015.09.01
ajax 파일 전송  (0) 2015.08.31
블로그 이미지

디츠

“말은 쉽지, 코드를 보여줘.” “Talk is cheap. Show me the code.” – 리누스 토르발스(Linus Torvalds)

,
 function is_ie() {
	if(navigator.userAgent.toLowerCase().indexOf("chrome") != -1) return false;
	if(navigator.userAgent.toLowerCase().indexOf("msie") != -1) return true;
	if(navigator.userAgent.toLowerCase().indexOf("windows nt") != -1) return true;
	return false;
}
   
function copy_to_clipboard(str) {
	if( is_ie() ) {
		window.clipboardData.setData("Text", str);
		alert("복사되었습니다.");
		return;
	}
	prompt("Ctrl+C를 눌러 복사하세요.", str);
}

<button onclick="copy_to_clipboard('Hello Jmnote2');">복사</button>

'javascript, jquery' 카테고리의 다른 글

jquery - ajax 파일 업로드  (0) 2015.09.19
href에서 파라메터값 분리하기  (0) 2015.09.17
엔터(enter) 입력시 폼(form) 전송  (0) 2015.09.01
ajax 파일 전송  (0) 2015.08.31
input 한글만, 영어만, 숫자만  (0) 2015.07.23
블로그 이미지

디츠

“말은 쉽지, 코드를 보여줘.” “Talk is cheap. Show me the code.” – 리누스 토르발스(Linus Torvalds)

,
 $("#inword").keypress(function(e) {
	if(e.which == 13){
		$("#myform").submit();
		return false;
	}
});

'javascript, jquery' 카테고리의 다른 글

href에서 파라메터값 분리하기  (0) 2015.09.17
url 주소를 클립보드로 복사하기  (0) 2015.09.16
ajax 파일 전송  (0) 2015.08.31
input 한글만, 영어만, 숫자만  (0) 2015.07.23
a 앵커 이동 부드럽게 이동  (0) 2015.07.23
블로그 이미지

디츠

“말은 쉽지, 코드를 보여줘.” “Talk is cheap. Show me the code.” – 리누스 토르발스(Linus Torvalds)

,
출처 : http://narei.tistory.com/entry/ajax%EB%A1%9C-%ED%8C%8C%EC%9D%BC%EC%97%85%EB%A1%9C%EB%93%9C%ED%95%98%EA%B8%B0
블로그 이미지

디츠

“말은 쉽지, 코드를 보여줘.” “Talk is cheap. Show me the code.” – 리누스 토르발스(Linus Torvalds)

,