본문 바로가기

IT/JSP

다이얼로그 만드는 방법(jsp, 스프링, css, html)

<script type="text/javascript">

function signup(){

alert('본 사이트는 별도의 회원가입을 지원하지 않습니다.\n리그오브레전드 실제 ID와 비밀번호로 로그인하세요.\n\n* 회원정보는 일절 저장되지 않습니다.');

}


function open_modal1(){

document.getElementById('openModal1').style.opacity="1";

document.getElementById('openModal1').style.pointerEvents="auto";

}


function close_modal1(){

document.getElementById('modal_form1').reset();

document.getElementById('openModal1').style.opacity="0";

document.getElementById('openModal1').style.pointerEvents="none";

}

</script>




<body>


<div id="openModal1" class="modalDialog">

<div class="contentsbox" style="width: 400px;">

<div class="submenubar">

가입신청 <a href="javascript:close_modal1()" class="closeModal">X</a>

</div>

<div class="subcontents" align="center">

<form method="get" action="/clan/${clanBean.addr}/joining"

id="modal_form1">

<input type="text" name="joinComments" maxlength="30" size="40"

placeholder="가입메시지를 30자이내로 입력해주세요" style="font-size: 15px;">

<input id="join_submit" class="btn_type1" type="submit"

value="가입신청">

</form>

</div>

</div>

</div>


</body>



/* 

Modal CSS

*/

.modalDialog {

position: fixed;

top: 0;

right: 0;

bottom: 0;

left: 0;

background: rgba(0, 0, 0, 0.6);

z-index: 99999;

opacity: 0;

pointer-events: none;

}


.modalDialog:target {

opacity: 1;

pointer-events: auto;

}


.modalDialog>div {

position: relative;

margin: 25% auto;

}


.closeModal {

color: #F22;

width: 14px;

line-height: 14px;

text-align: center;

text-decoration: none;

float: right;

}