如何在html中禁用整个下拉列表控件 [英] how to disable the entire dropdown control in html
本文介绍了如何在html中禁用整个下拉列表控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我看到在下拉列表中的特定项目上有一个禁用属性,但是在整个html下拉列表中是否有一个启用的属性?
i see there is a disabled property on a specific item in the dropdown list but is there an enabled property on the whole html dropdown itself?
任何建议?
推荐答案
根据 HTML 4规格 a select
元素有一个禁用
属性。
According to the HTML 4 spec a select
element has a disabled
attribute.
所以
<select disabled>
<option>Something</option>
</select>
应该工作
这篇关于如何在html中禁用整个下拉列表控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文