html表单下拉菜单_HTML表单:下拉菜单

html表单下拉菜单

Drop-down menus are used on forms to capture responses for which there is one correct response from multiple possible answers. A good example of this is asking for a visitor’s province, state or country.

表单上使用下拉菜单来捕获响应,对于这些响应,可以从多个可能的答案中获得一个正确的响应。 一个很好的例子就是要求访问者所在的省,州或国家。

考虑替代方案 (Considering Alternatives)

It's important to consider all the possibilities when making a form. We could simply present a textbox in which the user could type the province name, but that allows the possibility that they could make a typing mistake (which becomes an issue if this information is entered directly into a database, without human oversight). We could reduce the size of the textbox to to allow just two characters, and prompt the user just to type in the province or state abbreviation: while that reduces the possibility of error, it does not remove it.

制作表格时,必须考虑所有可能性。 我们可以简单地显示一个文本框,用户可以在其中输入省名,但是这允许他们可能会键入错误(如果将此信息直接输入到数据库中而没有人为监督,则会成为问题)。 我们可以将文本框的大小减小为仅允许两个字符,并提示用户仅输入省或州的缩写:虽然这会减少出错的可能性,但不会将其删除。

One of the best solutions to use for a question in a form for which there is only one right answer from a large number of possibilities is a drop-down menu.

下拉菜单是在多种可能性中只有一个正确答案的形式中用于问题的最佳解决方案之一。

下拉标记 (Drop-down Markup)

In an HTML form, this is created through the use of the <select> tag.

在HTML表单中,这是通过使用<select>标记创建的。

As always, we place our

  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值