怎样使用php写计算器?
<body><tablebgcolor=#717174align="center"width="450px"height="400px"'border="0"cellpa...
<body>
<table bgcolor=#717174 align="center" width="450px" height="400px"' border="0" cellpadding="0" cellspacing="0">
<caption>计算器</caption>
<tr>
<!--定义行标签包含五列,文本框定义为最多20个字符长度,不允许输入,长度为50单位-->
<th colspan="5"><input id="xsq" value="0" type="text" maxlength="20" readonly></th>
</tr>
<tr>
<td><input class="sss" type="button" value="MC" /></td>
<td><input class="sss" type="button" value="MR" /></td>
<td><input class="sss" type="button" value="MS" /></td>
<td><input class="sss" type="button" value="M+" /></td>
<td><input class="sss" type="button" value="M-" /></td>
</tr>
<tr>
<td><input class="sss" type="button" value="←"></td>
<td><input class="sss" type="button" value="CE"></td>
<td><input class="sss" type="button" value="C"></td>
<td><input class="sss" type="button" value="±"></td>
<td><input class="sss" type="button" value="√"></td>
</tr>
<tr>
<td><input class="sss" type="button" value="7"></td>
<td><input class="sss" type="button" value="8"></td>
<td><input class="sss" type="button" value="9"></td>
<td><input class="sss" type="button" value="/"></td>
<td><input class="sss" type="button" value="%"></td>
</tr>
<tr>
<td><input class="sss" type="button" value="4"></td>
<td><input class="sss" type="button" value="5"></td>
<td><input class="sss" type="button" value="6"></td>
<td><input class="sss" type="button" value="*"></td>
<td><input class="sss" type="button" value="1/x"></td>
</tr>
<tr>
<td><input class="sss" type="button" value="1"></td>
<td><input class="sss" type="button" value="2"></td>
<td><input class="sss" type="button" value="3"></td>
<td><input class="sss" type="button" value="-"></td>
<td rowspan="2"><input class="aaa" type="button" value="="></td>
</tr>
<tr>
<td colspan="2"><input class="bbb" type="button" value="0"></td>
<td><input class="sss" type="button" value="."></td>
<td><input class="sss" type="button" value="+"></td>
</tr> 展开
<table bgcolor=#717174 align="center" width="450px" height="400px"' border="0" cellpadding="0" cellspacing="0">
<caption>计算器</caption>
<tr>
<!--定义行标签包含五列,文本框定义为最多20个字符长度,不允许输入,长度为50单位-->
<th colspan="5"><input id="xsq" value="0" type="text" maxlength="20" readonly></th>
</tr>
<tr>
<td><input class="sss" type="button" value="MC" /></td>
<td><input class="sss" type="button" value="MR" /></td>
<td><input class="sss" type="button" value="MS" /></td>
<td><input class="sss" type="button" value="M+" /></td>
<td><input class="sss" type="button" value="M-" /></td>
</tr>
<tr>
<td><input class="sss" type="button" value="←"></td>
<td><input class="sss" type="button" value="CE"></td>
<td><input class="sss" type="button" value="C"></td>
<td><input class="sss" type="button" value="±"></td>
<td><input class="sss" type="button" value="√"></td>
</tr>
<tr>
<td><input class="sss" type="button" value="7"></td>
<td><input class="sss" type="button" value="8"></td>
<td><input class="sss" type="button" value="9"></td>
<td><input class="sss" type="button" value="/"></td>
<td><input class="sss" type="button" value="%"></td>
</tr>
<tr>
<td><input class="sss" type="button" value="4"></td>
<td><input class="sss" type="button" value="5"></td>
<td><input class="sss" type="button" value="6"></td>
<td><input class="sss" type="button" value="*"></td>
<td><input class="sss" type="button" value="1/x"></td>
</tr>
<tr>
<td><input class="sss" type="button" value="1"></td>
<td><input class="sss" type="button" value="2"></td>
<td><input class="sss" type="button" value="3"></td>
<td><input class="sss" type="button" value="-"></td>
<td rowspan="2"><input class="aaa" type="button" value="="></td>
</tr>
<tr>
<td colspan="2"><input class="bbb" type="button" value="0"></td>
<td><input class="sss" type="button" value="."></td>
<td><input class="sss" type="button" value="+"></td>
</tr> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询