js:
$("#area").on("input propertychange", function () {
var $this =$(this),
_val = $this.val(),
count ="";
if (_val.length >600) {
$this.val(_val.substring(0, 600));
}
count =600 - $this.val().length;
$("#text-count").text(count);
});
html:
<textarea class="form-control" name="content" id="area" placeholder="请输入文字内容(600字之内)">
<div class="bottom">
还可以输入<span id="text-count" style="color:red">600</span>/600,按下Enter键换行
</div>