HTML选择和文本输入 [英] HTML Select and Text Input

查看:100
本文介绍了HTML选择和文本输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们都看到了无数的表单实例,其中有一个选项作为其他,选择该选项时,我们看到一个输入文本框(它始终隐藏)要求我们输入在我们的输入。

有没有更好的方法来实现这个?有没有插件可以让我做得更好?或者是标准的HTML元素就足够了(有些设置为select标签,可能是)? 解决方案

可编辑的组合框可能是个好主意替代。我们面临的挑战是如何设计风格,以便用户清楚他可以实际编辑控件的内容,而不是只选择提供的默认内容。


We have all seen countless instances of forms with a select drop down having one of it's options as "Other" and on choosing that option, we get to see a input text box (which was hidden all along) asking us to type in our input.

Is there a better way to implement this? Are there plugins out there which will let me do this better? Or are standard HTML elements suffice (some setting to a select tag, may be) ?

解决方案

An editable combobox might be a good alternative. The challenge is to style it in such a way that it is clear to the user that he can actually edit the contents of the control, rather than only selecting the provided default contents.

这篇关于HTML选择和文本输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆