javascript XMLHttpRequest Object ์˜ˆ์ œ
ยท
Languages/JavaScript
XMLHttpRequest ๊ฐ์ฒด๋Š” IE6, IE5์—์„œ๋งŒ ๋‹ค๋ฅด๊ฒŒ ์„ ์–ธํ•ด์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์ƒํƒœ์ฝ”๋“œ๋กœ ์„ฑ๊ณต ์œ ๋ฌด๋ฅผ ํ™•์ธ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. form ํƒœ๊ทธ์—์„œ enctype application/json ๋ฐฉ์‹์„ ์ง€์›ํ•ด์ฃผ์ง€ ์•Š์„๋•Œ ์•„๋ž˜์™€๊ฐ™์ด XMLHttpRequest๋ฅผ ์ด์šฉํ•ด์ฃผ์‹œ๋ฉด ๋˜๊ฒ ์Šต๋‹ˆ๋‹ค. var parameterVal = '{"id":"'+id+'","passwd":"'+passwd+'"}'; var xmlhttp; if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp=new ActiveXObject("Micros..