禁用部分选择 [英] Disabling parts of a select

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

问题描述

我是否正确地认为虽然我可以禁用一个选择,但我不能

禁用选择中的< option>?

我认为是这样的,但我想确定。


谢谢,


- 蒂姆

Am I right in thinking that while I can disable a select, I can''t
disable the <option>s within the select?

I think this is the case but would like to be sure.

Thanks,

-- tim

推荐答案

Tim Streater写道:
Tim Streater wrote:

>

我是否正确思考虽然我可以禁用选择,但是我不能在选择中禁用<选项>?
我认为是这样的但是我想确定一下。
>
Am I right in thinking that while I can disable a select, I can''t
disable the <option>s within the select?

I think this is the case but would like to be sure.



根据MSDN HTML参考,对于已禁用,属性/属性:

" ...对于OPTGROUP和OPTION,HTML

4.0标准指定的功能目前尚未实现..."

According to MSDN HTML reference, for the "disabled" attribute/property:
"...For OPTGROUP and OPTION, the functionality specified by the HTML
4.0 standard is not currently implemented..."


在文章< 45 *************** @ thelogconnection.com>,

Gary Hasler< ga********@thelogconnection.comwrote:
In article <45***************@thelogconnection.com>,
Gary Hasler <ga********@thelogconnection.comwrote:

Tim Streater写道:
Tim Streater wrote:


我是否正确地认为虽然我可以禁用一个选择,但我不能在选择中禁用< option>?$ />

我认为情况确实如此,但我想确定。

Am I right in thinking that while I can disable a select, I can''t
disable the <option>s within the select?

I think this is the case but would like to be sure.



根据MSDN HTML参考,对于已禁用,属性/属性:

" ...对于OPTGROUP和OPTION,HTML

4.0标准指定的功能目前尚未实现......


According to MSDN HTML reference, for the "disabled" attribute/property:
"...For OPTGROUP and OPTION, the functionality specified by the HTML
4.0 standard is not currently implemented..."



谢谢。猜猜我将不得不把那些物品从弹出窗口中取出来。

很遗憾,它们在那里会很有用,但是暗淡无光,而且b $ b无法选择。


- tim

Thanks. Guess I''ll have to leave those items out of the popup then.
Shame, it would have been useful for them to be there, but dimmed and
unselectable.

-- tim


* Tim Streater写道:
* Tim Streater wrote:

我是否正确地认为虽然我可以禁用选择,但是我不能在选择中禁用<选项>?
我认为情况确实如此,但我想确定。
Am I right in thinking that while I can disable a select, I can''t
disable the <option>s within the select?

I think this is the case but would like to be sure.



如果你不想让它们被选中,就不要把它们放在一个选择的盒子里。

你可以有两个选择一个显示所选项目的框一个显示

未选择的项目。然后一个按钮从一个选择复制到另一个

(添加/删除)似乎熟悉? :-D用JavaScript做的很简单。

If you don''t want them to be selectable don''t put them in a select box.
You could have two select boxes one showing selected items one showing
unselected items. Then a button to copy from one select to the other
(add/remove) Seem familiar? :-D It''s trivial to do in JavaScript.


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

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