over 9 years ago
Hello all
To calculate characters inside HTML Editor we can use following block of code:
In HTML side we have :
<div id="editorDiv" contenteditable="true" onkeydown="calculateChar()"> </div>
In JavaScript we have :
function calculateChar(){ var smsText = document.getElementById('editorDiv').textContent; var count = smsText.length; // alert(count); return count ; }
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)