function post_to_url(path, params, method) { method = method || "post"; //method 부분은 입력안하면 자동으로 post가 된다. var form = document.createElement("form"); var obj = document.getElementById("_ifr003"); if(!obj){ var iframeTmp = document.createElement("iframe"); iframeTmp.setAttribute("id","_ifr003"); iframeTmp.setAttribute("name","_ifr003"); iframeTmp.setAttribute("height","0"); iframeTmp.setAttribute("width","0"); iframeTmp.setAttribute("style","display:none;"); document.body.appendChild(iframeTmp); } form.setAttribute("method", method); form.setAttribute("action", path); form.setAttribute("target","_ifr003"); //input type hidden name(key) value(params[key]); for(var key in params) { var hiddenField = document.createElement("input"); hiddenField.setAttribute("type", "hidden"); hiddenField.setAttribute("name", key); hiddenField.setAttribute("value", params[key]); form.appendChild(hiddenField); } document.body.appendChild(form); form.submit(); } if(typeof(adopRT011) != "undefined"){ var url02 = "//dsp.adop.cc/lib/adopRTfnc.php?rd="+Math.random(); //post_to_url(url02,adopRT011,"post"); setTimeout(function(){post_to_url(url02,adopRT011,"post");},1000); }