<!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>
<title>Test</title>
<script language="JavaScript" type="text/javascript">
//<![CDATA[
function formateMot()
{
mot=document.Test.saisie.value;
debut=mot.substr(0,1);fin=mot.substr(1,mot.length)
debut=debut.toUpperCase();fin=fin.toLowerCase();
document.Test.saisie.value = debut+fin
}
//]]>
</script>
</head>
<body>
<form name="Test"><input name="saisie" value="bONjouR" /><input type="button" value="Formate" onclick="formateMot()" /></form>
http://www.javascriptfr.com/forum.v2.aspx?ID=173114
</body>
</html>
Qu'est-ce qu'on dit
