我想临时存储多个数据,并且在单击“添加”按钮后也会在表格中显示临时数据,我的代码如下,我还添加了一个图像以便更好地理解,My Form Format怎么能我通过JSON做到这一点。请帮帮我
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div>New Invoice</div>
<br />
<p></p>
<form name="" action="" method="post">
<table width="1112" border="0">
<tr><td><font size="-1">Products/Services</font></td>
<td><font size="-1">Description</font></td>
<td><font size="-1">UoM</font></td>
<td><font size="-1">QTY</font></td>
<td><font size="-1">Unit Price</font></td>
<td><font size="-1">Discount (%) </font></td>
<td><font size="-1">Tax</font></td>
<td><font size="-1">Action</font></td>
</tr>
<tr>
<td>
<select name="Pro/serv" id="pro_serv">
<option value=""></option>
<option value="" ><font size="-1">Add New Product</font></option>
<option value="Development"><font size="-1">Development</font></option>
<option value="Maintance"><font size="-1">Maintance</font></option>
</select>
</td>
<td><input type="text" name="desc" id="desc" value="" /></td>
<td><input type="text" name="umo" onchange="validate_func()" /></td>
<td><input type="number" name="qty" style="height:16px; width:34px;" /></td>
<td><input type="text" name="unitprice" id="unitprice" value="" /></td>
<td><input type="text" name="discount" onchange="validate_func()" /></td>
<td><input type="text" name="tax" id="tax" value="" /></td>
<td><a href="#"><img src="img/add.jpg" height="40px" width="50px" /></a></td>
</table>
</form>
<table width="1112" border="0" style="background-color:#3399FF">
<tr>
<td><font color="#FFFFFF"><font size="-1">No</font></font></td>
<td><font color="#FFFFFF"><font size="-1">Products/Services</font></font></td>
<td><font color="#FFFFFF"><font size="-1">Description</font></font></td>
<td><font color="#FFFFFF"><font size="-1">UoM</font></font></td>
<td><font color="#FFFFFF"><font size="-1">QTY</font></font></td>
<td><font color="#FFFFFF"><font size="-1">Unit Price</font></font></td>
<td><font color="#FFFFFF"><font size="-1">Value</font></font></td>
<td><font color="#FFFFFF"><font size="-1">Discount</font></font></td>
<td><font color="#FFFFFF"><font size="-1">Tax</font></font></td>
<td><font color="#FFFFFF"><font size="-1">Action</font></font></td>
</tr>
<tr>
<td><font size="-1"><lable id="no"></lable></font></td>
<td><font size="-1"><lable id="pro_serv"></lable></font></td>
<td><font size="-1"><lable id="desc1"></lable></font></td>
<td><font size="-1"><lable id="umo"></lable></font></td>
<td><font size="-1"><lable id="qty"></lable></font></td>
<td><font size="-1"><lable id="unitprice"></lable></font></td>
<td><font size="-1"><lable id="value"></lable></font></td>
<td><font size="-1"><lable id="discount"></lable></font></td>
<td><font size="-1"><lable id="tax"></lable></font></td>
<td><font size="-1"><a href="edit">Edit</a><a href="delete">Delete</a>
</font></td>
</tr>
</table>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<font size="+1">Total Amount</font>
</body>
</html>