회원가입아이디/비번찾기
홈으로
식대 계산기... ^^
홈페이지홈페이지 19년 전
예제 클릭...*^^*
<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>
여러가지로 응용할수 있겠죠?
추천추천 : 279 추천 목록
번호 제목
2,880
 제이쿼리 랜덤으로 배경색 변경
2,879
 preg match에 관한 정규식
2,878
 Stream an audio file with MediaPlayer 오디오 파일 스트리밍 하기
2,877
 Audio Streaming PHP Code
2,876
 PHP $ SERVER 환경 변수 정리
2,875
 Vimeo (비메오) API 를 사용하여 플레이어 컨트롤하기
2,874
 iframe 사용시 하단에 발생하는 공백 제거방법
2,873
 아이프레임(iframe) 전체화면 가능하게 하기
2,872
 부트스트랩(bootstrapk)에서 사용하는 class명 정리
2,871
 부트스트랩 CSS
2,870
 크롬에서 마진 조절
2,869
 PHP 현재 페이지의 도메인명이나 url등의 정보 알아오기
2,868
 PHP preg match all()
2,867
 PHP 로 웹페이지 긁어오기 모든 방법 총정리!
2,866
 [PHP] 원격지 파일 주소 노출 안하고 curl로 다운로드 받기
2,865
 PHP 함수 정리
2,864
 아이프레임(iframe) 비율 유지하면서 크기 조절하는 방법
2,863
 PHP 배열에서 무작위로 하나 뽑아주는 array rand() 함수
2,862
 PHP 정규식 정리
2,861
 PHP 정규식을 활용한 태그 및 특정 문자열 제거 및 추출 방법
2,860
 php 크롤링 또는 파싱 함수, 정규식 모음
2,859
 제이쿼리 기본 명령어
2,858
 웹페이지 가로 모드세로 모드 인식하기
2,857
 모바일 웹 화면 강제 회전(가로모드 고정)
2,856
 [HTML5]에서 frameset 대체 방법과 iframe 속성
2,855
 HTML <Audio> 사용법
2,854
 윈도우10 시스템파일 손상 (초간단 오류 복구방법!!)
2,853
 PHP 파일 존재 여부 파악하기(로컬 파일 존재 및 원격지 파일 존재)
2,852
 [CSS] 박스 세로 가운데 중앙 정렬 6가지
2,851
 CSS Layout 수평 & 수직 정렬
목록
뮤직트로트 부산광역시 부산진구 가야동 ㅣ 개인정보취급방침
Copyright (C) musictrot All rights reserved.