반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Maven
- centos7
- mysql
- Next.js
- nodejs
- NextJS
- ajax
- SpringBoot
- git
- jenkins
- MSsql
- popup
- pwa
- Push
- jquery
- javascript
- rocky9
- Tomcat
- mybatis
- MariaDB
- node.js
- spring3
- docker
- Eclipse
- PM2
- Java
- security
- FCM
- yona
- config
Archives
- Today
- Total
종이 한장 차이...
PopUp화면 POST방식으로 처리... 본문
728x90
반응형
SMALL
팝업 링크를 호출 하는 순간(popUpBtn()함수가 호출 되면) form을 구성하여 window.open()에 매핑 하여 처리를 한다.
728x90
반응형
SMALL
function popUpBtn(){
window.open("", "tempInfoView", "directories=no,titlebar=no,toolbar=no,status=no,menubar=no, location=no,width=850, height=700, scrollbars=yes");
var tempInfoForm = document.createElement('form');
tempInfoForm.name= "tempInfoView";
tempInfoForm.action = "/info/tempInfo";
tempInfoForm.method= "POST";
tempInfoForm.target= "tempInfoView";//window.open에 명시한 이름
//첫번째 input param
var input = document.createElement('input');
input.type = 'hidden';
input.name = "param1";
input.value = $('#param1').val();
tempInfoForm.appendChild(input);
//두번째 input param
var input = document.createElement('input');
input.type = 'hidden';
input.name = "param2";
input.value = $('#param2').val();
tempInfoForm.appendChild(input);
//새번째 input param
var input = document.createElement('input');
input.type = 'hidden';
input.name = "param3";
input.value = $('#param3').val();
tempInfoForm.appendChild(input);
//네번째 input param
var input = document.createElement('input');
var param4 = "가나다라마바사";
input.type = 'hidden';
input.name = "param4";
input.value = param4;
tempInfoForm.appendChild(input);
//최종 만들어진form 생성
document.body.appendChild(tempInfoForm);
tempInfoForm.submit();
}
728x90
반응형
LIST
'javascript' 카테고리의 다른 글
동적 클릭 적용 및 클릭한 요소 내용을 dailog 창에 표시 하기 (0) | 2021.06.28 |
---|---|
javascript 전화번호 휴효성 검사 (0) | 2021.03.30 |
checkbox checked value control (0) | 2021.01.26 |
jquery li each 사용 Attribute 참조하기. (0) | 2021.01.12 |
javascript 브라우저 구분하기 (0) | 2020.12.01 |
Comments