Answers:
$(".ui-datepicker-month").live("click", function () {
    var monthname =  $(this).text();
    alert(monthname);
});
或者在jQuery 1.7+ on()中live已弃用:
$(document).on('click', '.ui-datepicker-month', function () {
    var monthname =  $(this).text();
    alert(monthname);
});
              我想你要.text():
var monthname = $(this).text();
              -以上都不对我有用。因此,这是我制定的解决方案,它使用基本功能,因此可在所有浏览器中一致地工作。希望这可以帮助其他人。使用jQuery 8.2
1)获取“ span”的jQuery对象。2)从上方获取DOM对象。使用jquery .get(0)3)使用DOM对象的innerText获取文本。
这是一个简单的例子
var curSpan = $(this).parent().children(' span').get(0);
var spansText = curSpan.innerText;
的HTML
<div >
<input type='checkbox' /><span >testinput</span> 
</div>
              
.live()在1.7中已弃用,而在1.9+中已删除