jQuery无法在asp.net中找到控件ID [英] JQuery unable to find id of control in asp.net

查看:60
本文介绍了jQuery无法在asp.net中找到控件ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$(#<%= RadioButtonList2.ClientID%>").change(function(){
if($(this).val()=="DC")
{
$(#trAmount").show();
$(#trBankName").show();
$(#trTransNum").show();
$(#trDepName").show();
$(#trCardNumber").hide();
$(#trCVV").hide();
$(#trHolderName").hide();
$(#trBeneficiaryName").hide();
$(#trWaiverReason").hide();
$(#trAmountToBeWaived").hide();
$(#trComments").hide();
};

是我在asp.net页的jquery中的代码,我无法获取控件RadioButtonList2的ID.

$("#<%=RadioButtonList2.ClientID %>").change(function() {
if($(this).val() == "DC")
{
$("#trAmount").show();
$("#trBankName").show();
$("#trTransNum").show();
$("#trDepName").show();
$("#trCardNumber").hide();
$("#trCVV").hide();
$("#trHolderName").hide();
$("#trBeneficiaryName").hide();
$("#trWaiverReason").hide();
$("#trAmountToBeWaived").hide();
$("#trComments").hide();
};

is my code in jquery in asp.net page, I am unable to get the id of the control RadioButtonList2. It doesnot give any error either.

推荐答案

(this).val()=="DC")
{
(this).val() == "DC")
{


(#trAmount").show();
("#trAmount").show();


(#trBankName").show ();
("#trBankName").show();


这篇关于jQuery无法在asp.net中找到控件ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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