A voir également:
- Vbs - SetFocus
- Vbs windows - Guide
- .Vbs virus ✓ - Forum Virus
- Vbs pause ✓ - Forum Autoit / batch
- Vbs runauto - Forum Virus
- Vbs edit - Télécharger - Édition & Programmation
2 réponses
<html>
<head>
<title>test de champ</title>
<script language="JavaScript">
function testChamp()
{
if (this.formulaire.nom.value == '')
{
this.formulaire.nom.focus();
alert('Entrez un nom !');
}
}
</script>
</head>
<body>
<form onsubmit="return false" name="formulaire" id="formulaire">
<p>Nom : <input name="nom" type="text" id="nom">
<br>
Age : <input name="age" type="text" id="age">
<br>
<input type="button" name="Submit" value="Submit" onclick="testChamp()">
</p>
</form>
</body>
</html>
<head>
<title>test de champ</title>
<script language="JavaScript">
function testChamp()
{
if (this.formulaire.nom.value == '')
{
this.formulaire.nom.focus();
alert('Entrez un nom !');
}
}
</script>
</head>
<body>
<form onsubmit="return false" name="formulaire" id="formulaire">
<p>Nom : <input name="nom" type="text" id="nom">
<br>
Age : <input name="age" type="text" id="age">
<br>
<input type="button" name="Submit" value="Submit" onclick="testChamp()">
</p>
</form>
</body>
</html>