如何选择连接名称

时间:2013-05-02 06:21:46

标签: javascript jquery jquery-plugins

如何在jquery中选择一个连接的名称,这是我的示例代码;

p = "WL_INVDTL.0001.LW3SUPRC";

$('input[name=p]').attr("disabled",false);

是否可以选择连接文本。

1 个答案:

答案 0 :(得分:4)

使用

$('input[name="' + p '"]').prop("disabled",false);

更新

$(document).ready(function() {
    $('#WL_INVDTL').on('click', 'tr td:first-child input:checkbox', function(){
        var $this = $(this);
        $this.closest('tr').find('input:text').prop('disabled', !$this.is(':checked'))
    })
});

演示:Fiddle

相关问题