我不确定你在这里的'boolean'是什么意思,但根据你想要的编辑:
$('#id-of-element').text()
如果你只想要div中的文字,或者
$('#id-of-element').html()
如果你想要HTML。所以,如果div包含:
<h1>foo</h1>,
text() 会给你“foo”,而 html() 会给你 ” <h1>foo</h1> ”。
text()
html()
<h1>foo</h1>