我想创建的是一个表:
- selection of country [when selected it generates the description in shipment-field and the respective price in the price-field]
- 固定产品名称和固定价格 [简单:-)]
- 配件的选择[它在价格字段中生成相应的价格]
- 产生的总金额合计 3 个价格
- 用表单方法=“post”提交总金额
图片示例
这是需要 jQuery 实现的代码的想法:
<form action="product.php" method="post">
<h2>Select Country shipment</h2>
<select>
<option>USA $1.00</option>
<option>CANADA $2.00</option>
<option>EUROPE $3.00</option>
</select>
<br />
<br />
<table border="1" cellpadding="5">
<tr>
<td width="200"></td>
<td width="60"><strong>Price</strong></td>
</tr>
<tr>
<td>Product</td>
<td>10.00</td>
</tr>
<tr>
<td><span id="shipment_text"></span></td>
<td><span id="shipment_price"></span></td>
</tr>
<tr>
<td>
<select>
<option value=""></option>
<option value="Accessory1">Accessory 1 - $1.00</option>
<option value="Accessory2">Accessory 2 - $2.00</option>
<option value="Accessory3">Accessory 3 - $3.00</option>
</select></td>
<td><span id="accessory_price"></span></td>
</tr>
<tr>
<td align="right"><strong>Total</strong></td>
<td><span id="total"></span></td>
</tr>
</table>
<br />
<input type="hidden" id="total" name="amount" value="" />
<input type="submit" value="Submit">
</form>
谢谢您的帮助!