如何在 jquery 中选择串联名称,这是我的示例代码;
p = "WL_INVDTL.0001.LW3SUPRC";
$('input[name=p]').attr("disabled",false);
是否可以选择串联文本。
最佳答案
使用
$('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
关于javascript - 如何选择串联名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16331617/