계산 스크립트좀 알려주세요 ㅠ > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

계산 스크립트좀 알려주세요 ㅠ 정보

계산 스크립트좀 알려주세요 ㅠ

본문

다름이 아니구요...

<p><input type="text" name="formtext1"> + <input type="text" name="formtext1">
    <input type="submit" name="계산하기"> <input type="text" name="formtext1"></p>

html 소스 없을까요  찾아봐도 없네요..

응용해서 적용하고싶은데  소스를 못찾겠어요
  • 복사

댓글 전체

<form nam=frm>
<p><input type="text" name="formtext1" > + <input type="text" name="formtext2">
    <input type="button" name="계산하기" onclick="calc()"> <input type="text" name="formtext3"></p>
</form>
<script>
function calc()
{
    var val = document.frm.formtext1.value + document.frm.formtext2.value;

    document.frm.formtext3.value = val
}
</script>

이런식으로 해야 하는데

http://www.anaesthetist.com/mnm/javascript/calc.htm

이소스 한번 봐보셔요
© SIRSOFT
현재 페이지 제일 처음으로