【发布时间】:2016-12-30 12:41:58
【问题描述】:
我能够附加图像,并且我想在 Hallticket 号码中附加学生 ID,我该怎么做。? 这是我的html:
<td><b>Hallticket:</b>S<div><p class="hallticketNumber">***studentid has to come here***</p>J'+jobID+'</div></td>
<td><div><img class="participantphoto" src=""/><input class="searchStudent" type="text" autocomplete="off"><input class="studentId" type="hidden" name="gdtest['+studentCount+'][studentId]"></div></td>
这是我尝试过的:
$(this).closest('div').find(".studentId").attr("value",ui.item.student_pid);//working
$(this).closest('div').find(".participantphoto").attr("src",ui.item.profile_pic);//working
$(this).closest('div').find(".hallticketNumber").attr("label",ui.item.student_pid); //Notworking
错误在
.attr("label",ui.item.student_pid);附近的最后一行
【问题讨论】:
标签: javascript jquery jquery-ui jquery-ui-autocomplete