我有单选按钮,我想在其中执行一些操作。更改事件不起作用,它显示以下错误,
未定义的参考错误: RightClick在装载时未定义
这是我正在使用的代码,请让我了解一下这个错误。
$(document).ready(function() {
console.log('In jQuery');
$('#rblKnowAboutCourse').change(function() {
console.log('In jQuery-On Click2-Sarvesh');
if ($(this).val() == "Other") {
$("#TextBox1").prop("disabled", false);
} else {
$("#TextBox1").prop("disabled", true);
}
});
});<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
Click: <input type="radio" id="rblKnowAboutCourse" />
<input type="text" id="TextBox1" value="" placeholder="textbox" />
此错误在html中显示本行的链接。
<body style="font-size:11px" onload="RightClick.init();">
这是我用的收音机,
<asp:RadioButtonList ID="rblKnowAboutCourse" runat="server" Font-Size="Medium" Height="30px" Width="708px" TextAlign="Right" RepeatDirection="Horizontal">
<asp:ListItem>Website</asp:ListItem>
<asp:ListItem>Friends</asp:ListItem>
<asp:ListItem>Your Company</asp:ListItem>
<asp:ListItem>Online Ad</asp:ListItem>
<asp:ListItem>other</asp:ListItem>
</asp:RadioButtonList>发布于 2019-07-09 04:46:51
谢谢大家的关心。我的问题只是通过将id更改为class来解决。
https://stackoverflow.com/questions/56928975
复制相似问题