Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Document sans nom</title> <script type="text/javascript" language="javascript"> function carcpix(field, countfield, maxlimit) { divcache=document.getElementById("CACHE"); divcache.innerHTML=document.getElementById('saisie').value; var NETSCAPE (navigator.appName "Netscape"); var Obj = document.getElementById('CACHE'); if(NETSCAPE) { Larg= Obj.offsetWidth; } else { Larg= Obj.scrollWidth; } divtaill=document.getElementById("taillediv"); divtaill.innerHTML=Larg; if (field.value.length > maxlimit) { field.value = field.value.substring(0, maxlimit); } else { countfield.value = maxlimit - field.value.length; } } </script> </head> <form name="test"> champsaisie : </form> La taille de la div est de px </html>