홈으로 | 무료회원가입 | 아이디/비번찾기
추천음악방송
식대 계산기... ^^
홈페이지홈페이지 18년 전
예제 클릭...*^^*
<html>
<head>
<title>식대계산기</title>
<script language="JavaScript">

        function cha()
        {
        
        summ=0
        siclist=""
        
        if (document.sicdae.cb1.checked)
        {
                summ+=document.sicdae.pay1.value*document.sicdae.gop1.value
                siclist+=document.sicdae.siclist1.value+"×"+document.sicdae.gop1.value+"\n"
        }        
        
        if (document.sicdae.cb2.checked)
        {
                summ+=document.sicdae.pay2.value*document.sicdae.gop2.value
                siclist+=document.sicdae.siclist2.value+"×"+document.sicdae.gop2.value+"\n"
        }

        if (document.sicdae.cb3.checked)
        {
                summ+=document.sicdae.pay3.value*document.sicdae.gop3.value
                siclist+=document.sicdae.siclist3.value+"×"+document.sicdae.gop3.value+"\n"
        }
        
        if (document.sicdae.cb4.checked)
        {
                summ+=document.sicdae.pay4.value*document.sicdae.gop4.value
                siclist+=document.sicdae.siclist4.value+"×"+document.sicdae.gop4.value+"\n"
        }        

        if (document.sicdae.cb5.checked)
        {
                summ+=document.sicdae.pay5.value*document.sicdae.gop5.value
                siclist+=document.sicdae.siclist5.value+"×"+document.sicdae.gop5.value+"\n"
        }

        if (document.sicdae.cb6.checked)
        {
                summ+=document.sicdae.pay6.value*document.sicdae.gop6.value
                siclist+=document.sicdae.siclist6.value+"×"+document.sicdae.gop6.value+"\n"
        }

        if (document.sicdae.cb7.checked)
        {
                summ+=document.sicdae.pay7.value*document.sicdae.gop7.value
                siclist+=document.sicdae.siclist7.value+"×"+document.sicdae.gop7.value+"\n"
        }

        if (document.sicdae.cb8.checked)
        {
                summ+=document.sicdae.pay8.value*document.sicdae.gop8.value
                siclist+=document.sicdae.siclist8.value+"×"+document.sicdae.gop8.value+"\n"
        }

        if (document.sicdae.cb9.checked)
        {
                summ+=document.sicdae.pay9.value*document.sicdae.gop9.value
                siclist+=document.sicdae.siclist9.value+"×"+document.sicdae.gop9.value+"\n"
        }

        if (document.sicdae.cb10.checked)
        {
                summ+=document.sicdae.pay10.value*document.sicdae.gop10.value
                siclist+=document.sicdae.siclist10.value+"×"+document.sicdae.gop10.value+"\n"
        }

        
        document.sicdae.allsum.value=summ
        document.sicdae.allsiclist.value=siclist

        }
        
        function su1()
        {document.sicdae.gop1.select()}

        function su2()
        {document.sicdae.gop2.select()}

        function su3()
        {document.sicdae.gop3.select()}

        function su4()
        {document.sicdae.gop4.select()}

        function su5()
        {document.sicdae.gop5.select()}

        function su6()
        {document.sicdae.gop6.select()}

        function su7()
        {document.sicdae.gop7.select()}

        function su8()
        {document.sicdae.gop8.select()}

        function su9()
        {document.sicdae.gop9.select()}

        function su10()
        {document.sicdae.gop10.select()}

</script>
<style type="text/css">
<!--
.basiccss {
        font-family: "돋움";
        font-size: 12px;
}

A:link { font-family:"돋움";font-size: 12px;color:#999999;text-decoration:none; }
A:visited { font-family:"돋움";font-size: 12px;color: #999999;text-decoration:none; }
A:active { font-family:"돋움";font-size: 12px;color: #999999;text-decoration:none; }
A:hover { font-family:"돋움";font-size: 12px;color: #ffffff; text-decoration:underline; }

-->
</style>
</head>

<body>
<form name="sicdae">
  <table width="649" height="367" border="0" cellpadding="0" cellspacing="0" class="basiccss">
    <tr>
      <td width="649" height="56" align="left" valign="top"><table width="614" height="47" border="0" cellpadding="0" cellspacing="0" class="basiccss">
          <tr>
            <td align="center" valign="middle"><strong>식대 계산기 v1.0</strong></td>
          </tr>
          <tr>
            <td align="center" valign="middle"><strong>종류,가격을 바꾸셔도 적용이 됩니다.</strong></td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td height="173" align="left" valign="top"> <table width="617" height="189" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="428" valign="top"><table width="419" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000" class="basiccss">
                <tr align="center" valign="middle" bgcolor="#999999">
                  <td width="67" height="28"><font color="#FFFFFF">갯 수</font></td>
                  <td width="259" height="30"><font color="#FFFFFF">종 류</font></td>
                  <td width="89"><font color="#FFFFFF">가 격</font></td>
                </tr>
                <tr align="center" valign="middle" bgcolor="#FFFFFF">
                  <td> <input type="checkbox" name="cb1" value="" onClick="cha()")>
                    ×
                    <input name="gop1" type="text" size="1" maxlength="1" value="1" onKeyUp="cha()" onMouseOver="su1()">
                  </td>
                  <td> <input name="siclist1" type="text" value="다솔김밥" onKeyUp="cha()">
                  </td>
                  <td>\
                    <input name="pay1" type="text" value="1000" size="7" maxlength="7" onKeyUp="cha()">
                  </td>
                </tr>
                <tr align="center" valign="middle" bgcolor="#DBDBDB">
                  <td> <input type="checkbox" name="cb2" value="checkbox" onclick="cha()">
                    ×
                    <input name="gop2" type="text" size="1" maxlength="1" value="1" onKeyUp="cha()" onMouseOver="su2()">
                  </td>
                  <td> <input name="siclist2" type="text" value="치즈김밥" onKeyUp="cha()">
                  </td>
                  <td>\
                    <input name="pay2" type="text" value="1500" size="7" maxlength="7" onKeyUp="cha()">
                  </td>
                </tr>
                <tr align="center" valign="middle" bgcolor="#FFFFFF">
                  <td> <input type="checkbox" name="cb3" value="checkbox" onclick="cha()")>
                    ×
                    <input name="gop3" type="text" size="1" maxlength="1" value="1" onKeyUp="cha()" onMouseOver="su3()">
                  </td>
                  <td> <input name="siclist3" type="text" value="쇠고기김밥" onKeyUp="cha()">
                  </td>
                  <td>\
                    <input name="pay3" type="text" value="1500" size="7" maxlength="7" onKeyUp="cha()">
                  </td>
                </tr>
                <tr align="center" valign="middle" bgcolor="#DBDBDB">
                  <td> <input type="checkbox" name="cb4" value="checkbox" onclick="cha()")>
                    ×
                    <input name="gop4" type="text" size="1" maxlength="1" value="1" onKeyUp="cha()" onMouseOver="su4()">
                  </td>
                  <td> <input name="siclist4" type="text" value="참치김밥" onKeyUp="cha()">
                  </td>
                  <td>\
                    <input name="pay4" type="text" value="2000" size="7" maxlength="7" onKeyUp="cha()">
                  </td>
                </tr>
                <tr align="center" valign="middle" bgcolor="#FFFFFF">
                  <td> <input type="checkbox" name="cb5" value="checkbox" onclick="cha()")>
                    ×
                    <input name="gop5" type="text" size="1" maxlength="1" value="1" onKeyUp="cha()" onMouseOver="su5()">
                  </td>
                  <td> <input name="siclist5" type="text" value="뚝배기불고기" onKeyUp="cha()">
                  </td>
                  <td>\
                    <input name="pay5" type="text" value="4000" size="7" maxlength="7" onKeyUp="cha()">
                  </td>
                </tr>
                <tr align="center" valign="middle" bgcolor="#DBDBDB">
                  <td> <input type="checkbox" name="cb6" value="checkbox" onclick="cha()")>
                    ×
                    <input name="gop6" type="text" size="1" maxlength="1" value="1" onKeyUp="cha()" onMouseOver="su6()">
                  </td>
                  <td> <input name="siclist6" type="text" value="라볶기" onKeyUp="cha()">
                  </td>
                  <td>\
                    <input name="pay6" type="text" value="2500" size="7" maxlength="7" onKeyUp="cha()">
                  </td>
                </tr>
                <tr align="center" valign="middle" bgcolor="#FFFFFF">
                  <td> <input type="checkbox" name="cb7" value="checkbox" onclick="cha()")>
                    ×
                    <input name="gop7" type="text" size="1" maxlength="1" value="1" onKeyUp="cha()" onMouseOver="su7()">
                  </td>
                  <td> <input name="siclist7" type="text" value="라면" onKeyUp="cha()">
                  </td>
                  <td>\
                    <input name="pay7" type="text" value="2000" size="7" maxlength="7" onKeyUp="cha()">
                  </td>
                </tr>
                <tr align="center" valign="middle" bgcolor="#DBDBDB">
                  <td> <input type="checkbox" name="cb8" value="checkbox" onclick="cha()")>
                    ×
                    <input name="gop8" type="text" size="1" maxlength="1" value="1" onKeyUp="cha()" onMouseOver="su8()">
                  </td>
                  <td> <input name="siclist8" type="text" value="돈까스" onKeyUp="cha()">
                  </td>
                  <td>\
                    <input name="pay8" type="text" value="4000" size="7" maxlength="7" onKeyUp="cha()">
                  </td>
                </tr>
                <tr align="center" valign="middle" bgcolor="#FFFFFF">
                  <td> <input type="checkbox" name="cb9" value="checkbox" onclick="cha()")>
                    ×
                    <input name="gop9" type="text" size="1" maxlength="1" value="1" onKeyUp="cha()" onMouseOver="su9()">
                  </td>
                  <td> <input name="siclist9" type="text" value="해물라면" onKeyUp="cha()">
                  </td>
                  <td>\
                    <input name="pay9" type="text" value="2500" size="7" maxlength="7" onKeyUp="cha()">
                  </td>
                </tr>
                <tr align="center" valign="middle" bgcolor="#DBDBDB">
                  <td> <input type="checkbox" name="cb10" value="checkbox" onclick="cha()")>
                    ×
                    <input name="gop10" type="text" size="1" maxlength="1" value="1" onKeyUp="cha()" onMouseOver="su10()">
                  </td>
                  <td> <input name="siclist10" type="text" value="된장찌게" onKeyUp="cha()">
                  </td>
                  <td>\
                    <input name="pay10" type="text" value="3500" size="7" maxlength="7" onKeyUp="cha()">
                  </td>
                </tr>
              </table></td>
            <td width="210" align="center" valign="top"><table width="181" height="246" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000" class="basiccss">
                <tr>
                  <td width="181" height="30" align="center" valign="middle" bgcolor="#999999"><font color="#FFFFFF">주문리스트</font></td>
                </tr>
                <tr>
                  <td height="239" align="center" valign="top" bgcolor="#FFFFFF"><textarea name="allsiclist" cols="20" rows="15"></textarea></td>
                </tr>
              </table></td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td height="34" align="left" valign="top"> <table width="426" height="42" border="0" cellpadding="0" cellspacing="0" class="basiccss">
          <tr align="right" valign="middle">
            <td width="413" align="center" valign="middle"><font size="2"> 
              </font> <table width="304" height="24" border="0" cellpadding="0" cellspacing="0">
                <tr align="center" valign="middle">
                  <td width="95" align="right"><font size="2">계 :  </font></td>
                  <td width="105"><font size="2">
                    <input name="allsum" type="text" size="15" maxlength="15" value="">
                    </font></td>
                  <td width="104"><font size="2">
                    <input type="reset" name="Reset" value="초기화">
                    </font></td>
                </tr>
              </table>
              <font size="2">  </font></td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td height="35" align="left" valign="middle" bgcolor="#FFFFFF"><table width="613" height="28" border="0" cellpadding="0" cellspacing="0" class="basiccss">
          <tr>
            <td width="613" align="right" valign="middle" bgcolor="#000000"><font color="#FFFFFF"><a href="http://www.xtx.kr">http://www.xtx.kr</a>   </font></td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
</body>
</html>
여러가지로 응용할수 있겠죠?
추천추천 : 268 추천 목록
번호 제목
3,025
 윈도우10 시스템파일 손상 (초간단 오류 복구방법!!)
3,024
 PHP 파일 존재 여부 파악하기(로컬 파일 존재 및 원격지 파일 존재)
3,023
 [CSS] 박스 세로 가운데 중앙 정렬 6가지
3,022
 CSS Layout 수평 & 수직 정렬
3,021
 여러 도메인들 간 쿠키 공유하기
3,020
 태그 사이에 있는 텍스트를 추출
3,019
 [JQuery] textbox focus on off일때 숫자 콤마 보여주기
3,018
 쿠키 생성,가져오기,삭제
3,017
 사용자 함수 모음
3,016
 마우스,키보드 제한 ( 오른쪽클릭,드래그,영역선택등..)
3,015
 [HTML5] <video> - DOM으로 제어하기
3,014
 HTML5 video 태그에서 영상 좌우반전
3,013
 PHP - 특정 태그 및 문자열 추출, 제거
3,012
 [PHP] define과 defined의 차이
3,011
 우클릭 완벽차단 스크립트
3,010
 iframe 높이 100% 맞추기
3,009
 curl 함수를 이용한 HTTP REFERER 변경
3,008
 윈도우10 시스템 파일 및 Dism 검사
3,007
 텍스트 줄바꿈, 글자자르기 CSS
3,006
 jQuery Mobile에서 유용한 코드 10가지.
3,005
 [PHP] dirname()함수와 $_SERVER 관련 상수들
3,004
 [PHP] 파일 크기, 사이즈 불러오는 함수, filesize()
3,003
 [jQuery] jQuery Quick API
3,002
 [ transition ] 링크 hover 색상 변화 속도 조절
3,001
 PHP 5.3.0 에서 사라진 함수들 대체
목록
뮤직트로트 부산광역시 부산진구 가야동 ㅣ 개인정보취급방침
Copyright (C) musictrot All rights reserved.