开发者

Disable a RadioButtonList Item - Firefox

开发者 https://www.devze.com 2023-02-18 13:03 出处:网络
In an ASP.NET 2.0 project I\'ve got a RadioButtonList. I\'d like to disable one of the items in this list, but when I change the Enable property of an item to false it just wrappers the item with a sp

In an ASP.NET 2.0 project I've got a RadioButtonList. I'd like to disable one of the items in this list, but when I change the Enable property of an item to false it just wrappers the item with a span instead of开发者_开发问答 disabling the Input when rendered to Html:

<span disabled="disabled">
   <input id="ctl00_RadioGroup_2" type="radio" value="OK" name="ctl00$RadioGroup">
   <label for="ctl00_RadioGroup_2">Ok</label>
</span>

This works Fine on IE9 but on FF4 the radio button is still enabled.

Any quick solution for this issue? Or is the only way would be some Javascript?


span-tag doesn't have a disable attribute. check w3c it will be better to use javascript to set disable to each radio input element

0

精彩评论

暂无评论...
验证码 换一张
取 消