<br><div class="msgheader"> <div class="right"><span style="CURSOR: pointer" onclick="copycode(getid('phpcode31'));"><u>コードをコピーします</u></span></div>コードは次のとおりです:</div> <div class="msgborder" id="phpcode31"> <br> <br> <br><meta name="content-type" content="text/html; charset=UTF-8"> <br><title>Calculator</title> <br><!-- ボタンが「=」の場合、eval メソッドを呼び出して計算します。結果をテキスト ボックスに出力します --> <br><script type="text/javascript"> <br />var <br />function onclicknum(nums) { <br />str = document.getElementById("nummessege"); <br />str.value = str.value nums; <br />関数 onclickclear() { <br />str = document.getElementById("nummessege "); <br />str.value = ""; <br />} <br />function onclickresult() { <br />str = document.getElementById("nummessege"); <br />numresult = eval(str.value) ; <br />str .value = numresult; <br /></script> <br> <br> <br><table border="1" align="center" bgcolor="#bbff77"></table>style="height: 350px; width: 270px"> <br><tr> <br><tdcolspan> <br><input type="text" id="nummessege">style="height: 90px;幅: 350px; フォント サイズ: 50px" /> <br> <br></tdcolspan> </tr> <br><tr> <br><td> <br>style="高さ: 70px; 幅: 90px; フォントサイズ: 35px"> td> <br> </td> <td> <br><input type="button" value="2" id="2" onclick="onclicknum(2)">style="高さ: 70px; 幅: 90px; フォントサイズ : 35px"> <br> </td> <br><td> <br><input type="button" value="3" id="3" onclick="onclicknum (3)">style="高さ: 70px; 幅: 90px"> <br> </td> <br><td> <br>style="height: 70px width: 90px"> <br> </td> <br> <br><td> <br><input type="button" value="4" id="4">style ="高さ: 70px; 幅: 90px; font-size: 35px"> <br> </td> <br><td> <br>style="height: 70px; width: 90px; font-size: 35px"> <br> </td> <td> <br><input type="button" value="6" id="6" onclick="onclicknum(6)">style="高さ: 70px; 幅: 90px; フォントサイズ: 35px"> <br> </td> <br><td> <br><input type="button" value="-" id="sub" onclick="onclicknum('-') ">スタイル ="高さ: 70px; 幅: 90px; フォントサイズ: 35px"> <br> </td> <br> </tr> <tr> <br> <br><input type="button" value="7" id="7" onclick="onclicknum(7)">style="高さ: 70px; 幅: 90px; フォントサイズ: 35px"> <br> <br><td> <br><input type="button" value="8" id="8" onclick="onclicknum(8)">style="高さ: 70px; 幅: 90px; フォントサイズ: 35px"> <br> </td> <td> <br><input type="button" value="9 " id="9 " onclick="onclicknum(9)">style="height: 70px; width: 90px"> <br> </td> <br><td></td>< ;input type="button" value="*" id="mul" onclick="onclicknum('*')" <br>style="高さ: 70px; 幅: 90px; フォントサイズ: 35px"> <br> <br> </tr> <br><tr> <br><tdcolspan> <br><input type="button " value="0 " id="0" onclick="onclicknum(0)">style="height: 70px; width: 190px"> <br> 🎜><td></td> <input type="button" value="." id="point" onclick="onclicknum('.')">style="高さ: 70px; 幅: 90px ; font-size: 35px"> <br> <br><td> <br><input type="button" value="/" id="division">onclick= "onclicknum('/ ')" <br>style="height: 70px; width: 90px; font-size: 35px"> <br> </td></tdcolspan> </tr> ;tr> <br><tdcolspan> <br><input type="button" value="Del" id="clear">onclick="onclickclear()" <br> style="高さ: 70px; 幅: 190px; フォントサイズ: 35px" /> <br> <br><tdcolspan> button" value=" =" id="result" <br>onclick="onclickresult()" <br>style="高さ: 70px; 幅: 190px; フォントサイズ: 35px" /> <br> <br><br> <br><br> <br> <br> <br></tdcolspan></tdcolspan> </div> <br><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/file_images/article/201409/201409031736224.gif?201483173635?x-oss-process=image/resize,p_40" class="lazy" alt="">