window.open POST 방식으로 요청

1643 단어 window.open

function openPostWindow(url, name, applyNo, dptCde, height, width, top, left) {    
		     var postForm = document.createElement("form");    
		     postForm.id="postForm";    
		     postForm.method="post";    
		     postForm.action=url;    
		     postForm.target=name;    
		    
		     //  
		     var applyNoInput = document.createElement("input");    
		     applyNoInput.type="hidden";    
		     applyNoInput.name= "applyNo";
		     applyNoInput.value= applyNo;  
		     postForm.appendChild(applyNoInput); 
		     
		     //  
		     var dptCdeInput = document.createElement("input");    
		     dptCdeInput.type="hidden";    
		     dptCdeInput.name= "dptCde";
		     dptCdeInput.value= dptCde;  
		     postForm.appendChild(dptCdeInput);   
		     
		     postForm.attachEvent("onsubmit",function(){ openWindow(name, height, width, top, left); });  
		     document.body.appendChild(postForm);    
		  
		     postForm.fireEvent("onsubmit");  
		     postForm.submit();  
		     document.body.removeChild(postForm);  
		}  
		  
function openWindow(name, height, width, top, left) {    
		     window.open('about:blank',name,'height='+ height +',width='+ width +',top='+ top +',left='+ left +',toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no,depended=yes');     
		}

좋은 웹페이지 즐겨찾기