开发者

Disable radio button depending on date

I'm a novice in Javascript, and trying to figure out how to using Javascript to disable radio button attribute

In my form, I have a date picker and 10 radio buttons below. I want so开发者_Python百科me radio buttons turn to gray if specific date is selected, and some another radio buttons turn gray if another date is chosen.

It's a bit complicated for me, so please help me.

Thank you very much


For learning something new, I suggest trying to solve the same kind of problem in a simpler situation. Try making a form with just a textfield, and 2 radio buttons, and one of them is disabled when text is entered.


Do not use date.value = "24/12/2010" - it can significantly differ depending on user locale. Use new Date(date.value) to operate with Date type.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜