开发者

radiobuttonlist selected value and its validation

i have an form in which i ha开发者_Python百科ve radiolist and set of text boxes and dropdownlist.now when i check an radio some textboxes will be disabled and some text box will be enabled .now i want to validate only the enabled text box and not the disabled one. in the same manner when i check other radiobutton i want to validate the rest of the text boxes.can some body help please.

some one give me the validation code for that.


If you can use jQuery then you can get the enabled text boxes using

$("input[type='text']:disabled")

and the enabled text boxes using

$("input[type='text']:not(:disabled))

If you want to use simple javascript then you can get all the textboxes, then iterate through them, check the type attribute for text and check the disabled attribute to true or false.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜