Bind an event handler to the text element, and then set the state of the checkbox according to whether there is a value or not:$('#OtherTextValue').on('keyup', function() { $('#OtherTextRadio').prop('checked', !!this.value.length);});您可能要使用其他事件,因为这仅在释放键时触发. 查看文档You may want to use additional events, as this only triggers when a key is released. Check the documentation 这篇关于选中文本框后激活单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-30 11:42
查看更多