사업자정보확인 팝업 만들기

hong·2021년 10월 25일
0

javascript

목록 보기
2/4

script

<script>
//href : 주소
//w : 가로 길이
//h : 세로 길이
//xPos , yPos : 화면의 중앙에 위치시키기 위해 존재 (듀얼모니터용..) 
function businessInfo(href, w, h){  
let xPos =(document.body.offsetWidth/2) - (w/2);
xPos = xPos+window.screenLeft
const yPos = (document.body.offsetHeight/2) - (h/2);
window.open(href, "businessInfo", "width="+w+", height="+h+", left="+xPos+", top="+yPos+", menubar=yes, status=yes, titlebar=yes, resizable=yes");}
</script>

html

<button onclick="businessInfo('url',800,800)">정보</button>

css

button{
position: absolute;
bottom: 0;
right: 0;
width: 70px;
height: 20px;
}
profile
프론트엔드 개발을 하고 있습니다 ⌨️

0개의 댓글

관련 채용 정보