Sometimes, it's (for example):
return "<input type='color'...
and some others are:
return '<input type="hidden"...
The best way is probably:
return '<input type="hidden"...
as HTML principaly uses double quote.
return "<input type='color'...
return '<input type="hidden"...
return '<input type="hidden"...
<div id='compteurmessage' style='color:red'>0 word - 0 character</div>
<script>function Compter(id){
var txt=document.getElementById(id).value;var chaine=document.getElementById(id).value;
var nombreCaractere=txt.replace(/[/?w+]/g,'').length;
var array = chaine.split(/bw+b/);
var nombreMots=array.length-1;
var msg222=' '+nombreMots+' words | '+nombreCaractere+ ' chars.';
document.getElementById('compteur'+id).innerHTML= msg222; }</script>
<textarea id="message" name="message" onkeyup="Compter('message');" spellcheck="true" rows="12" cols="70"></textarea>