본문 바로가기

async

(3)
외부 자바스크립트 파일을 호출하는 위치 http://code.i-harness.com/ko/q/6a8bb 태그를 html 의 head 에 넣으면..해당 .js 파일을 다운로드 하는 동안 웹브라우저가 DOM 구조 생성을 연기합니다. 이것이 기본.옛날 웹브라우저나 최근 웹브라우저나 동일한 기능. 그래서, 바로 이전 태그에 상기 script 태그를 넣는 경우가 있었으나..이렇게 하면, 본문에 사용되는 스크립트가 실행되어야 할 때 외부 자바스크립트 파일이 다운로드 될 때까지 기다려야 함. 최신 웹브라우저들은 defer 와 async 옵션을 script 태그에 넣어서, head 에 추가 되었을 때..DOM 구조 생성 과정과 외부 .js 파일 다운로드를 서로 비동기적으로 실행.외부 .js 가 하나라면 두 옵션이 동일한 기능.외부 .js 가 여러개라면 a..
[모음글] jQuery ajax $.ajax({ url : '...', // 변수를 이용해서 url 설정 가능, Math.random() 를 파라미터로 넣어줌으로써 캐시 제거 가능 global : false, // Default true, 또는 생략 type : 'post', // 또는 get cache : false, // Default true, 캐시를 사용하지 않으려면 false 요망 data : {curData:curDate, to_date2:to_date2}, // JSon 스타일 //data : 'curData='+curDate+'&to_date2='+to_date2', // String 스타일. $('form').serialize() 코드는 간단하지만.. dataType : 'stirng', // json jsonp xml..
자바스크립트 다시 공부 심도있는 개념들이 잘 설명되어 있어요, 예제와 함께..https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide You don't know 시리즈https://github.com/getify/You-Dont-Know-JS/blob/master/up%20&%20going/README.md#you-dont-know-js-up--goinghttps://github.com/getify/You-Dont-Know-JS/blob/master/scope%20&%20closures/README.md#you-dont-know-js-scope--closureshttps://github.com/getify/You-Dont-Know-JS/blob/master/this%20&%20o..