08-问题
10.2.1 问题
你的订单表单有用于运送和账单联络信息的字段。你决定为用户提供表示用户运送信息和账单信息相同的复选框,使界面更加友好。当选中该复选框时,禁用账单字段:
<fieldset id="shippingInfo">
<legend>Shipping Address</legend>
<label for="shipName">Name</label>
<input name="shipName" id="shipName" type="text" />
<label for="shipAddress">Address</label>
<input name="shipAddress" id="shipAddress" type="text" />
</fieldset>
<fieldset id="billingInfo">
<legend>Billing Address</legend>
<label for="sameAsShipping">Same as Shipping</label>
<input name="sameAsShipping" id="sameAsShipping" type="checkbox"
value="sameAsShipping" />
<label for="billName">Name</label>
<input name="billName" id="billName" type="text" />
<label for="billAddress">Address</label>
<input name="billAddress" id="billAddress" type="text" />
</fieldset>