首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >单选按钮更改事件不处理RightClick错误

单选按钮更改事件不处理RightClick错误
EN

Stack Overflow用户
提问于 2019-07-08 05:41:47
回答 1查看 55关注 0票数 0

我有单选按钮,我想在其中执行一些操作。更改事件不起作用,它显示以下错误,

未定义的参考错误: RightClick在装载时未定义

这是我正在使用的代码,请让我了解一下这个错误。

代码语言:javascript
复制
$(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);
    }
  });
});
代码语言:javascript
复制
<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();">

这是我用的收音机,

代码语言:javascript
复制
<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>
EN

回答 1

Stack Overflow用户

发布于 2019-07-09 04:46:51

谢谢大家的关心。我的问题只是通过将id更改为class来解决。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56928975

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档