1. script

<script language="javascript" type="text/javascript">
<!--

function display(chk)
{
    if (chk.checked == true)
    {
        document.all["new_cal"].style.display="";
    } else {
        document.all["new_cal"].style.display="none";
    }
}

//-->
</script>


2. 코딩



<span style="position: relative; width: 25%; text-align: right;">
    <input type="checkbox" onclick="display(this)" style="border: 0;">2. 두께의 새로운 공식 보기
</span>

<span id='new_cal' style='display: none;'>
<%
    If val = "air" Then
        Call cert_air()
    ElseIf val = "water" Then
        Call cert_water()
    ElseIf val = "press" Then
        Call cert_press()
    End If
%>
</span>


Posted by 하늘치

MEDION AKOYA E1210(B) 10인치 미니노트북의 혁명(아톰CPU탑재,160GB HDD, Draft-N기술채용)


마음이 가고 있는 미니노트북.. 오호...

단점으로는 3셀의 부족한 배터리용량과, 발열이라던데.. 어떨까??


Posted by 하늘치

<script language="javascript" type="text/javascript">
<!--

function chkcalculation()
{
    var p

    p = return_float(form1.cert_1.value);
}


// return_float
function return_float(val)
{
    var comp;

    if(strAllTrim(val)=="")
        comp=0;
    else
        comp = parseFloat(val);

    comp = parseInt(comp*100)/100;

    return comp;
}

-->
</script>



Posted by 하늘치

asp 에서 원하는 소수점유효자리수까지만 표시하고 나머지는 버리기

formatnumber(Int(aa*100)/100,2)


예를 들면..


<%
'=========================
' 테스트용..
'=========================
Dim aa, bb, num

aa = "23.456"
bb = "12.3"

response.write "<br> aa = " & aa
response.write "<br> bb = " & bb

aa = Int(aa * 100)/100
num = formatnumber(aa,2)
response.write "<br><br> aa 소수점 두자리만 " & num

bb = Int(bb * 100)/100
num = formatnumber(bb,2)
response.write "<br><br> bb 소수점 두자리만 " & num

response.write "<br><br>" & formatnumber(Int(aa*100)/100,2)
%>



결과는 다음과 같더라.
=================================
aa = 23.456
bb = 12.3

aa 소수점 두자리만 23.45

bb 소수점 두자리만 12.30

23.45
=================================



결론은 이거..
======================================
formatnumber(Int(aa*100)/100,2)
======================================

Posted by 하늘치