[debutant] page html qui ne fait pas fonctionner la fonction
Bonjour !
Je suis nouveau sur ce forum. J'espere profiter de l'experience des anciens :) et apporter ensuite mon savoir aux nouveaux :).
Voici mon probleme :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| <html>
<head>
<title>Basic Format</title>
<script language="Javascript1.2">
function testNumber() {
<!-- if(if(parseInt(document.myform.a)!=document.myform.a-0))
if(document.myform.a==1)
{-->
alert("not integer value ! Please put an integer number");
<!-- document.myform.a=0;
}
else {
alert("it is working");
}
}-->
}
</script>
</head>
<body>
<H2>Please fill out this form:</H2>
<FORM METHOD="POST" ACTION="http://localhost:8080/student/servlet/FormAB" name="myform">
<BR>a <INPUT NAME="a" onChange="testNumber()">
<BR>b: <INPUT NAME="b" onChange="testNumber()">
<BR>
<BR><INPUT TYPE="submit" value="Submit Form"> <INPUT TYPE="reset" value="Reset">
</FORM>
</body>
</html> |
Bon le probleme c'est que lorsque je change la variable bormalement il devrait avoir un message hors il n'y a rien pourquoi ?