JQ:

1 <div class="wrap">
2         <textarea></textarea>
3         <div class="miss"></div>
4     </div>
View Code
1 $('textarea').on('input propertychange', function() {
2         $('.miss').html($(this).val().length + "~"+$(this).val());
3     });
View Code

JS:

1 var txt = document.querySelector("textarea"),
2         msg = document.querySelector(".miss");
3     //不兼容IE8 以下
4     txt.addEventListener("input",function  () {
5         msg.innerHTML = this.value + "~"+this.value.length;
6     },false)
View Code