我在网上搜索并查看了有关如何计算字符的 API Docs,我目前正在使用这个:$('.test').val().length;
但是,它根本不起作用。
我的 div 看起来像这样:<div class="test">Count These Letters</div>
我希望$('.test').val().length;
返回19
,但它返回1
......我是否使用了错误的功能?
我在网上搜索并查看了有关如何计算字符的 API Docs,我目前正在使用这个:$('.test').val().length;
但是,它根本不起作用。
我的 div 看起来像这样:<div class="test">Count These Letters</div>
我希望$('.test').val().length;
返回19
,但它返回1
......我是否使用了错误的功能?