<html> <head> <title>계산기</title> <script> bBool=false var copiedtext="" var tempstore="" function initiatecopy() { bBool=true; } function copyit() { if (bBool) { tempstore=copiedtext document.execCommand("Copy") if (tempstore!=copiedtext) { alert(copiedtext); } bBool=false; } } document.onselectionchange = initiatecopy document.onmouseup = copyit </script> </head> <script language="JavaScript"> function cal(p){ p.value=eval(p.value) } function e_expr(p,str){ p.value=p.value+str } function clear_expr(p){ p.value="" } </script> <body> <center> <form name="calform"> <div align="left"> <table border=30 bordercolor="silver" bordercolordark="silver"> <td colspan=4> <p align="center"><input type="text" name="expr" size="20"></p> <tr> <tr> <td> <p align="center"><input type="button" value=" 7 " onclick="e_expr(document.calform.expr,'7')"> </p> <td> <p align="center"><input type="button" value=" 8 " onclick="e_expr(document.calform.expr,'8')"> </p> <td> <p align="center"><input type="button" value=" 9 " onclick="e_expr(document.calform.expr,'9')"> </p> <td> <p align="center"><input type="button" value=" ÷ " onclick="e_expr(document.calform.expr,'/')"> </p> <tr> <td> <p align="center"><input type="button" value=" 4 " onclick="e_expr(document.calform.expr,'4')"> </p> <td> <p align="center"><input type="button" value=" 5 " onclick="e_expr(document.calform.expr,'5')"> </p> <td> <p align="center"><input type="button" value=" 6 " onclick="e_expr(document.calform.expr,'6')"> </p> <td> <p align="center"><input type="button" value=" × " onclick="e_expr(document.calform.expr,'*')"> </p> <tr> <td> <p align="center"><input type="button" value=" 1 " onclick="e_expr(document.calform.expr,'1')"> </p> <td> <p align="center"><input type="button" value=" 2 " onclick="e_expr(document.calform.expr,'2')"> </p> <td> <p align="center"><input type="button" value=" 3 " onclick="e_expr(document.calform.expr,'3')"> </p> <td> <p align="center"><input type="button" value=" - " onclick="e_expr(document.calform.expr,'-')"> </p> <tr> <td> <p align="center"><input type="button" value=" 0 " onclick="e_expr(document.calform.expr,'0')"> </p> <td> <p align="center"><input type="button" value=" 00 " onclick="e_expr(document.calform.expr,'00')"> </p> <td> <p align="center"><input type="button" value=" . " onclick="e_expr(document.calform.expr,'.')"> </p> <td> <p align="center"><input type="button" value=" + " onclick="e_expr(document.calform.expr,'+')"> </p> <tr> <td colspan=2> <p align="center"><input type="button" value=" = " onclick="cal(document.calform.expr)"> </p> <td colspan=2> <p align="center"><input type="button" value="초기화" onclick="clear_expr(document.calform.expr)"> </p> <tr> </tr> </table> </div> </form> </center> </body> </html> <body oncontextmenu="return false">
2015.01.21 17:20
계산기 html 소스
조회 수 1516 추천 수 0 댓글 0
웹코드
자바스크립트
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
52 | 간단한 계산 소스 1 | 보석 | 2015.01.21 | 1499 | |
» | 계산기 html 소스 | 보석 | 2015.01.21 | 1516 | |
50 | Math.abs // Math.round 뜻 | 보석 | 2015.01.27 | 1821 | |
49 | 기타 | 타사이트 자바스크립트 배껴쓰기 part3 | 보석 | 2013.09.04 | 2398 |
48 | 기타 | 타사이트 자바스크립트 배껴쓰기 part1 | 보석 | 2013.09.04 | 2452 |
47 | 기타 | 타사이트 자바스크립트 배껴쓰기 part2 | 보석 | 2013.09.04 | 2524 |
46 | 기본 | 시간대 별로 다른 맨트 날리는 스크립트 | 보석 | 2013.09.05 | 2550 |
45 | 기본 | 단축키 지정 스크립트 | 보석 | 2013.09.05 | 2586 |
44 | 기본 | 홈페이지 진입시 간단한 맨트 넣기 | 보석 | 2013.09.06 | 2647 |
43 | 기본 | 질문 후 확인 누르면 홈페이지 진입 스크립트 | 보석 | 2013.09.05 | 2679 |
42 | 기본 | 이미지에 마우스를 올리기만 해도 해당 링크로 팝업되는 스크립트 | 보석 | 2013.09.05 | 2684 |
41 | 기본 | 랜덤 배너 스크립트 (이미지, 텍스트, 배경음악) | 보석 | 2013.09.05 | 2804 |
40 | 기본 | 접속하면 이름을 물어보고 그 이름으로 인사하기 | 보석 | 2013.09.03 | 2859 |
39 | 기본 | 한 링크에 랜덤으로 이동하는 URL 넣기 | 보석 | 2013.09.05 | 2878 |
38 | 기본 | 지정된 날자에서 몇일 지났는지 알려주는 스크립트 | 보석 | 2013.09.06 | 2916 |
37 | 기본 | 이미지에 마우스를 올리기만 해도 해당 링크로 이동되는 스크립트 | 보석 | 2013.09.04 | 2979 |
36 | 기본 | 자바스크립트 창을 열면 간단한 맨트 날리기 | 보석 | 2013.09.03 | 3115 |
35 | 기본 | 로그인창 만드는 스크립트 | 보석 | 2013.09.06 | 3263 |
34 | 기본 | 시간별로 배경화면 다르게 출력하는 스크립트 | 보석 | 2013.09.04 | 3407 |
33 | 기본 | 배경색 변하는 버튼 스크립트 | 보석 | 2013.09.09 | 3812 |