如果我有以下HTML:
<th title="Title Description">Blah</th>
Run Code Online (Sandbox Code Playgroud)
title单击时如何从属性中选择文本<th>?
$(function() {
$('th').click(function() {
var title = $(this).attr('title');
});
});
Run Code Online (Sandbox Code Playgroud)