```

(".datepicker1, .datepicker2").datepicker({
dateFormat: "yy-mm-dd"
,onSelect: function(d,i){
var event;
if(typeof(Event) === 'function') {
    event = new Event('input', { 'bubbles': true })
}else{
    event = document.createEvent('Event');
    event.initEvent('input', true, true);
}
$(this)[0].dispatchEvent(event);
     }
});

```

javascript 메모리릭 관련 

settimeout memory leak


메모리 릭 발생코드 . 

var timeoutObj; 

function testF(){


$.ajax({

type:"POST",

url: 'url',

success:function(result){

timeoutObj= setTimeout(function (){

testF()

}, 1000);

}

});

}

testF()


해결 방법. 

var timeoutObj; 

function testF(){


$.ajax({

type:"POST",

url: 'url',

success:function(result){

clearTimeout(timeoutObj);

timeoutObj= setTimeout(function (){

testF()

}, 1000);

}

});

}

testF()



참고 사이트 

https://developer.mozilla.org/ko/docs/Web/JavaScript/Memory_Management


구글 개발자도구 메모리 할당 프로파일러 도구 사용법 

https://developers.google.com/web/tools/chrome-devtools/memory-problems/allocation-profiler?hl=ko


https://developers.google.com/web/tools/chrome-devtools/memory-problems/?hl=ko#allocation-profile

js tree drag 밑 데이타 구하는 메소드
	
	jstree demo
	

	



	

	

Data format demo

선택값:
선택 코드 :
검색어

javascript 정규식 관련 ppt  깔끔함. ㅎ 


http://www.slideshare.net/ibare/ss-39274621

+ Recent posts