如何编写一个加法器?
发布时间:2016-12-29 来源:查字典编辑
摘要:如何编写一个加法器?
如何编写一个加法器?
<form action="./calculation.asp">
<input type="text" size="1" name="op1 value=<%Response.Write Request("op1")%>>
<input type="submit" name="operation value="plus">
<input type="text" size="1" name="op2 value=<%Response.Write Request("op2")%>>
equals
<%
Dim result
If Request("operation") = "plus" Then
result = CLng(Request("op1")) + CLng(Request("op2"))
Else
result = "?"
End If
Response.Write result
%>
</form>