Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/293.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用jquery更改函数显示和隐藏值_C#_Jquery_Asp.net - Fatal编程技术网

C# 使用jquery更改函数显示和隐藏值

C# 使用jquery更改函数显示和隐藏值,c#,jquery,asp.net,C#,Jquery,Asp.net,我想显示()和隐藏()与单击radiobuttonlist有关的显示 我已经设置了一个属性keep customization=“1”,该属性在table标记中设置 我写的代码是: $("keep-customization").change(function () { if ($(this).is(":checked").val() == "") { example(".textgrid").has("input[keep-current-customizat

我想显示()和隐藏()与单击radiobuttonlist有关的显示

我已经设置了一个属性keep customization=“1”,该属性在table标记中设置

我写的代码是:

 $("keep-customization").change(function () {
    if ($(this).is(":checked").val() == "")
    {
        example(".textgrid").has("input[keep-current-customization='false']").show();
    }
    else {
        example(".textgrid").has("input[keep-current-customization='false']").hide();
    }
});
我在页面上查找radiobuttonlist的来源是:

<div class="textgrid">
                                <div class="feildset1">
                                    Account holders name on your current phone bill?: </br><input name="rptCustomization$ctl07$rptItems$ctl00$ctrl" type="text" maxlength="100" id="rptCustomization_rptItems_7_ctrl_0" keep-current-customization="false" /></br>
                                    <br />
                                </div>
                            </div>

                            <div class="textgrid">
                                <div class="feildset1">
                                    Current phone company you have?: </br><input name="rptCustomization$ctl07$rptItems$ctl01$ctrl" type="text" maxlength="100" id="rptCustomization_rptItems_7_ctrl_1" keep-current-customization="false" /></br>
                                    <br />
                                </div>
                            </div>

                            <div class="textgrid">
                                <div class="feildset1">
                                    What is the account # with your current provider?: </br><input name="rptCustomization$ctl07$rptItems$ctl02$ctrl" type="text" maxlength="100" id="rptCustomization_rptItems_7_ctrl_2" keep-current-customization="false" /></br>
                                    <br />
                                </div>
                            </div>

                            <div class="textgrid">
                                <div class="feildset1">
                                    What is the PIN/access code for current provider?: </br><input name="rptCustomization$ctl07$rptItems$ctl03$ctrl" type="text" maxlength="100" id="rptCustomization_rptItems_7_ctrl_3" keep-current-customization="false" /></br>
                                    <br />
                                </div>
                            </div>

                            <div class="textgrid">
                                <div class="feildset1">
                                    What are the two nearest cross streets?: </br><input name="rptCustomization$ctl07$rptItems$ctl04$ctrl" type="text" maxlength="100" id="rptCustomization_rptItems_7_ctrl_4" keep-current-customization="false" /></br>
                                    <br />
                                </div>
                            </div>
保留您当前的电话号码(必填)

你会保留你现在的电话号码吗?

必需。 Y N
更改radiobuttonlist时显示和隐藏的div分别为:

<div class="textgrid">
                                <div class="feildset1">
                                    Account holders name on your current phone bill?: </br><input name="rptCustomization$ctl07$rptItems$ctl00$ctrl" type="text" maxlength="100" id="rptCustomization_rptItems_7_ctrl_0" keep-current-customization="false" /></br>
                                    <br />
                                </div>
                            </div>

                            <div class="textgrid">
                                <div class="feildset1">
                                    Current phone company you have?: </br><input name="rptCustomization$ctl07$rptItems$ctl01$ctrl" type="text" maxlength="100" id="rptCustomization_rptItems_7_ctrl_1" keep-current-customization="false" /></br>
                                    <br />
                                </div>
                            </div>

                            <div class="textgrid">
                                <div class="feildset1">
                                    What is the account # with your current provider?: </br><input name="rptCustomization$ctl07$rptItems$ctl02$ctrl" type="text" maxlength="100" id="rptCustomization_rptItems_7_ctrl_2" keep-current-customization="false" /></br>
                                    <br />
                                </div>
                            </div>

                            <div class="textgrid">
                                <div class="feildset1">
                                    What is the PIN/access code for current provider?: </br><input name="rptCustomization$ctl07$rptItems$ctl03$ctrl" type="text" maxlength="100" id="rptCustomization_rptItems_7_ctrl_3" keep-current-customization="false" /></br>
                                    <br />
                                </div>
                            </div>

                            <div class="textgrid">
                                <div class="feildset1">
                                    What are the two nearest cross streets?: </br><input name="rptCustomization$ctl07$rptItems$ctl04$ctrl" type="text" maxlength="100" id="rptCustomization_rptItems_7_ctrl_4" keep-current-customization="false" /></br>
                                    <br />
                                </div>
                            </div>

您当前电话账单上的帐户持有人姓名?:


您目前拥有的电话公司是:


您在当前提供商的账户是什么?:


当前提供商的PIN/访问代码是什么?:


最近的两个十字路口是什么



您不能创建自己的html属性,如“保持自定义”。此外,您无法处理表的更改事件,因为它不存在


尝试为班级更改它。并将事件绑定到单选按钮。

我在服务器端创建它是为了将它与其他表单区分开来,因为它是一个通用表单,但jQuery无法处理它。@AbidAli,如果要创建自定义属性,在它们前面加上
数据-
,我认为jQuery将支持that@Satpal
data-
属性来自HTML5,但是有些数据是用来收集的,而不是用作选择器的。将数据属性简单地用作选择器是不可能的。那么它们在我的情况下就没有用处了,那么@Satpal。。你说什么?