wootook-reloaded/scripts/cntchar.js
Gregory PLANCHAT d7619777af Initial commit
2011-06-07 09:23:48 +02:00

14 lines
335 B
JavaScript

var x = "";
var e = null;
function cntchar(m) {
if(window.document.forms[0].text.value.length > m) {
window.document.forms[0].text.value = x;
} else {
x = window.document.forms[0].text.value;
}
if(e == null)
e = document.getElementById('cntChars');
else
e.childNodes[0].data = window.document.forms[0].text.value.length;
}