데이터 - 추가 키의 값을 찾으려면 을 클릭하십시오. 버튼을 제거하십시오. 어떻게 할 수 있습니까? 나는 다음과 같은 시도데이터 속성을 사용하여 찾기
<tr class="<%: classNames %>">
<td data-extra-key="<%: item.ServiceKey %>">
<%: item.ServiceName %>
for
<%: item.PetName %><sub><%: item.Description %></sub>
</td>
<td>
<%if (item.IsAnExtra && !item.IsCancelled)
{ %>
<button class="btnRemoveExtraService actionButton secondaryButton short" type="button" itemid="<%:item.Id%>">
Remove</button>
<%} %>
</td>
</tr>
(내가와 데이터 속성 찾을 를 사용하는 방법을 모른다) :
$('.btnRemoveExtraService').die('click').live('click', function() {
var service= $(this).parents('tr').find('').val();
return false;
});
네 : – Sampath