Jquery基于gridview下拉选择启用/禁用文本框 [英] Jquery to enable/disable textbox based on gridview dropdown selection
本文介绍了Jquery基于gridview下拉选择启用/禁用文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有3个下拉列表和2个文本框的gridview。
我想要一个以下功能的jquery,
I have a gridview with 3 dropdownlists and 2 textboxes.
I want a jquery for the below functionality,
if( ddl1.selection ="1")
{
ddl2.enabled = true
txt1.enabled=true
}
else
{
ddl2.enabled = true
txt1.enabled=true
}
我有以下代码,用jquery编写,
I have the below code like this written in jquery,
$(function() {
$(".ddl1class").change(function() {
if ($(this).find('option:selected').text() == "1") {
//$(".ddl2class").attr('disabled', true);
} else {
//$(".ddl3class").attr('disabled', true);
}
});
});
但是我无法理解如何找到ddl1的 gridview的ddl2
要启用/禁用行。
有人可以帮助..
But Iam not able to understand how to find the ddl2 of ddl1's gridview
row to be enabled/disabled.
Can someone please help..
推荐答案
( function (){
( .ddl1class)。change( function (){
if (
(".ddl1class").change(function() { if (
( this )。find('' 选项:选中')。text()== 1){
//
(this).find('option:selected').text() == "1") { //
这篇关于Jquery基于gridview下拉选择启用/禁用文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文