当前位置:嗨网首页>书籍在线阅读

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>