javascript

Hagi 2012. 6. 5. 13:46

// cvv sample display control
function showCVVSample() {
document.getElementById('cvv_sample_disp').style.display = "";
}
document.onclick = function (e) {
var target = (e) ? e.target : window.event.srcElement;
if (target.id != 'cvv_sample_disp' && target.id != 'cvv_sample_link') {
hideCVVSample();
}
}
function hideCVVSample() {
document.getElementById('cvv_sample_disp').style.display = 'none';
}


------------------------------------------------------------------------


<div class="credit_card_code"><a href="#" onclick="showCVVSample()" id="cvv_sample_link">What is this?</a></div>
<div class="credit_card_code_info" id="cvv_sample_disp" style="display:none">Where to find your Security Code? Visa / MasterCard</div>


-------------------------------------------------------------------------------

.credit_card_code {
width: 70px;
height: auto;
position: relative;
top: -40px;
left: 340px;
font-family: "MyriadProRegular";
font-size: 12px;
font-weight: 400;
 color: #999999;
}


.credit_card_code_info {
width: 149px;
height: 228px;
float: left;
position: relative;
top: -40px;
left: 340px;
font-family: "MyriadProRegular";
font-size: 12px;
font-weight: 400;
color: #999999;
background: url(../image/credit_card_code.png) top center no-repeat;
padding-top: 15px;
padding-left: 13px;
line-height: 15px;
}


참고 :  http://tweb.tistory.com/entry/%EC%97%AC%EB%B0%B1%EB%B0%94%ED%83%95-%ED%81%B4%EB%A6%AD%EC%8B%9C-%EB%A0%88%EC%9D%B4%EC%96%B4-%EC%82%AC%EB%9D%BC%EC%A7%80%EA%B2%8C-%ED%95%98%EA%B8%B0