부모창
<script type="text/javascript">
// 제품검색
function open_form(data){
window.open("forms/get_production_date.php?send_page="+data,
"form",
"left=300,top=100,width=800,height=700,scrollbars=yes,resizable=yes");
}
function setChildValue_resin_num(resin_num){
document.getElementById("pro_name").value = resin_num;
}
</script>
자식창
<script>
function setChildValue_resin_num(resin_num){
// console.log("setChildValue_resin_num");
// console.log(resin_num);
opener.setChildValue_resin_num(resin_num);
// window.opener.document.getElementById("pro_name").value = resin_num;
window.close();
}
</script>
'JavaScript' 카테고리의 다른 글
코드 발급을 누른 후 그자리가 등록버튼으로 바뀌게 하기 (0) | 2021.07.05 |
---|---|
특정 조건일 때 div class 변경하기 / 텍스트 변경하기 (0) | 2021.06.30 |
js 자리수 만큼 남는 공간을 0으로 채우기 (0) | 2021.06.22 |
yearpicker 에서 년도 선택하는 창이 잘 안뜨거나, 뜨고나서 바로 닫아지는 현상 수정 (0) | 2021.06.16 |
현재 날짜 YYMMDD 받아오기 (0) | 2021.06.10 |