单击单选按钮填充文本框 [英] populate text box on click of radio button

查看:109
本文介绍了单击单选按钮填充文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有3个单选按钮,当它们中的一个被选择我想在文本框自动把文本.例如,如果用户选择了是"单选按钮,则我希望在文本框中输入文本是",如果他们选择另一个单选按钮,则我希望将其清除.

I have 3 radio buttons, when one of them is selected I want to automatically put text in a textbox. For example, If the user selected the 'Yes' radio button, I want the text 'Yes' put in the textbox, and if they select another radio button I want it to be cleared.

有人可以帮我吗?

推荐答案

您想要这个吗?

http://jsfiddle.net/viralshah/KNct8/3/

希望这可以解决您的问题.

Hope this resolve your problem.

这篇关于单击单选按钮填充文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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