开发工具与关键技术:VS、计算总金额
作者:陆桂超
撰写时间:2019年7月6日
在做项目开发时,一些页面要用到计算的功能,下面我通过一个小例子来实现计算金额的功能。我使用的是c#编程语言。
1、html代码,首先准备好单价,数量和总金额的input标签。并绑定id值。
<span>苹果单价:</span><input class="" id="Quantity1" onkeyup="Plantion1(this)" /> <br>
<span>苹果数量:</span><input class=" mt-1" id="UnitPrice1" onkeyup="Plantion1(this)" /><br>
<span>苹果总价:</span><input class=" mt-1" id="Amount1" />
<span>西瓜单价:</span><input class="" id="Quantity2" onkeyup="Plantion1(this)" /> <br>
<span>西瓜数量:</span><input class=" mt-1" id="UnitPrice2" onkeyup="Plantion1(this)" /><br>