加入收藏 | 设为首页 | 会员中心 | 我要投稿 我爱制作网_池州站长网 (https://www.0566zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MySql教程 > 正文

如何编写一个加法器?

发布时间:2016-11-29 17:26:56 所属栏目:MySql教程 来源:站长网
导读:如何编写一个加法器? lt;form action="./calculation.asp"gt; lt;input type="text" size="1" name="op1 value=lt;%Response.Write Request("op1")%gt;gt; lt;input type="submit" name="operation value="plus"gt; lt;input type="text" size="1" name="

如何编写一个加法器?

lt;form action="./calculation.asp"gt;

lt;input type="text" size="1" name="op1 value=lt;%Response.Write Request("op1")%gt;gt;

lt;input type="submit" name="operation value="plus"gt;

lt;input type="text" size="1" name="op2 value=lt;%Response.Write Request("op2")%gt;gt;

equals

lt;%

nbsp;nbsp; Dim result

nbsp;nbsp; If Request("operation") = "plus" Then

nbsp;nbsp;nbsp;nbsp;nbsp; result = CLng(Request("op1")) + CLng(Request("op2"))

nbsp;nbsp; Else

nbsp;nbsp;nbsp;nbsp;nbsp; result = "?"

nbsp;nbsp; End If

nbsp;nbsp; Response.Write result

%gt;nbsp;

lt;/formgt;

(编辑:我爱制作网_池州站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!