[英]How to check a checkbox on focus of Input text in table
I am trying to check a checkbox in table DOM on focus of input text, but am not able to access the checkbox element, but my focus is working 我正在尝试检查表DOM中关于输入文本焦点的复选框,但是无法访问checkbox元素,但是我的焦点正在工作
and here is my jsfiddle link https://jsfiddle.net/9qha9vft/ 这是我的jsfiddle链接https://jsfiddle.net/9qha9vft/
here is my code 这是我的代码
Jquery code jQuery代码
$("td .focus-evt").focus(function() {
$(this).siblings("td input.flat").prop('checked', true);;
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.