我想问一下如何使用名称隐藏特定字段。例如:
<input type="text" name="when_is_escrow_set_to_close" class=" regular-text" value="" />
我想隐藏这个字段。在带有 id 和 class 的普通 jquery 中,我们通过以下方式隐藏它:
$('.classname').hide();
但是当我们需要按名称调用选择器时如何使用相同的查询。
谢谢
最佳答案
$("input[name='when_is_escrow_set_to_close']").hide();
//^^^selectortype^^^^^attribute name="attributevalue"
关于Jquery 按名称隐藏作为选择器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20063838/