选择名称为数组字段的输入字段 [英] Select input field with name as array field
本文介绍了选择名称为数组字段的输入字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想根据条件选择文本字段,例如:
I wanted to select the text field based on condition, for example:
if only text field name = sname[] than only put value in it.
为此我用
<input type="text" name="sname[]" />
where name = sname;
//For each name type field in extra add contact module if that i visible.
$('input[name=' + name + '[]]').each(function() {
});
但是我无法深入了解它.请建议如何进入选择范围.
But I'm not able to get inside of it. Please suggest how to get into the selection.
推荐答案
$('input[name="' + name + '[]"]').each(function() {
$(this).val('Some value');
});
这篇关于选择名称为数组字段的输入字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文