1) GET방식
1 2 |
/* get */ window.open(URL + "&" + encodeURI($.param(params, true)), "popup_id", 'height=' + 650 + ',width=' + 1024 + 'fullscreen=yes'); |
2) POST방식
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 |
/* post */ var form = document.createElement("form"); form.setAttribute("method", "post"); form.setAttribute("action", url); form.setAttribute("target", "popup_id"); var input = document.createElement('input'); input.type = 'hidden'; input.name = "변수1"; input.value = "변수값1"; form.appendChild(input); input = document.createElement('input'); input.type = 'hidden'; input.name = "변수2"; input.value = "변수값2"; form.appendChild(input); input = document.createElement('input'); input.type = 'hidden'; input.name = "변수3"; input.value = "변수값3"; form.appendChild(input); document.body.appendChild(form); if( /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) ){ window.open(url, "popup_id"); }else{ window.open(url, "popup_id", "resizable=yes,toolbar=yes,menubar=yes,location=yes"); } form.submit(); document.body.removeChild(form); |