La copie de code est la suivante:
<input name = "title" type = "text" size = "50" value = "{$ p.title}" maxLength = "15" onkeyup = "javascript: setShOwlGlend (this, 15, 'cost_tpl _title_length');" > <span id = "cost_tpl_title_length"> Vous pouvez également entrer 15 mots </span>
JS:
La copie de code est la suivante:
fonction setShOwlNGLENGHT (OBJ, MaxLength, ID)
{
var rem = maxLength - obj.value.length;
var wid = id;
if (rem <0) {
rem = 0;
}
document.getElementById (wid) .InnerHtml = "Vous pouvez également entrer" + REM + "Word Count";
}