나는 다음과 같은 HTML이있는 경우 : 내가 <th>
를 클릭하면<th>을 클릭하면 제목 속성에서 텍스트를 가져 오는 방법은 무엇입니까?
<th title="Title Description">Blah</th>
가 어떻게이 title
속성에서 텍스트를 선택합니까를?
나는 다음과 같은 HTML이있는 경우 : 내가 <th>
를 클릭하면<th>을 클릭하면 제목 속성에서 텍스트를 가져 오는 방법은 무엇입니까?
<th title="Title Description">Blah</th>
가 어떻게이 title
속성에서 텍스트를 선택합니까를?
$(function() {
$('th').click(function() {
var title = $(this).attr('title');
});
});
감사합니다. 굉장히 유용하다. –
$('th').click(function(){alert($(this).attr('title'));});
$(function() {
$('th').click(function() {
var title = $(this).attr('title');
// do something useful with title
});
});
$('tr').click(function() {
var title = $(this).children('th').attr('title');
});
이
$(document).ready(function() {
$('th').click(function() {
var title = $(this).attr('title');
alert(title);
});
});
곳 TR가 위치한 시도? 마크 업을 더 게시 할 수 있습니까? – David
당신은 당신의 마크 업이 TH라고 말합니다. TH – MrFoh
네, 죄송합니다. 오식. 수정 됨. – santa