开发者

How to change a radio button value from a textbox value

i would love to have the textbox value as my radio button value. For example, if I type "1" in the textbox, then the radio button value would change to "1".I hope i could find answers here. By the way, i am using Joomla, and if there are javascripts, pls tell me whe开发者_如何学编程re to paste it. thanks so much!!!


Never mind, i solved it :D here it is.

$('#textbox').keyup(function(event){ var value = $(this).val(); $('#radio').val(value); });

you also need to change the value of your #radio to the id of your textbox e.g

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜