我试图从一组生成的输入中更改输入值。如何更改一组输入中特定输入的值? .input-process-info是我正在使用的表的类。
$(".input-process-info input.process-inputs").on("change", function (){
})
<!-- Generated HTML code -->
<tr class='center aligned'>
<td><span>A</span></td>
<td><div class='ui mini input'><input class='process-inputs' type='text' placeholder=''></div></td>
<td><div class='ui mini input'><input class='process-inputs' type='text' placeholder=''></div></td>
<td><div class='ui mini input'><input class='process-inputs' type='text' placeholder=''></div></td>
</tr>
<tr class='center aligned'>
<td><span>A</span></td>
<td><div class='ui mini input'><input class='process-inputs' type='text' placeholder=''></div></td>
<td><div class='ui mini input'><input class='process-inputs' type='text' placeholder=''></div></td>
<td><div class='ui mini input'><input class='process-inputs' type='text' placeholder=''></div></td>
</tr>
答案 0 :(得分:0)
如果HTML是动态生成的,您可以按如下方式使用事件委派:
<div th:if="${currentuser} != 'noBodyHome'"> show prin + show logout button</div>
Context context = getApplicationContext();
AppContactService appContactService = new AppContactService(context);
if (!appContactService.isContactExists("bdhameliya1"))
{
List<Contact> contactList = new ArrayList<Contact>();
Contact contact = new Contact();
contact.setUserId("adarshk");
contact.setFullName("John");
contact.setImageURL("R.drawable.couple");
contactList.add(contact);
Contact contactRaj = new Contact();
contactRaj.setUserId("krunal");
contactRaj.setFullName("krunal");
contactRaj.setImageURL("https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xap1/v/t1.0-1/p200x200/12049601_556630871166455_1647160929759032778_n.jpg?oh=7ab819fc614f202e144cecaad0eb696b&oe=56EBA555&__gda__=1457202000_85552414c5142830db00c1571cc50641");
contactRaj.setEmailId("krunal.kd@gmail.com");
contactList.add(contactRaj);
appContactService.addAll(contactList);
}