Aide javascript
Fermé
tom818
Messages postés
19
Date d'inscription
mardi 10 juillet 2007
Statut
Membre
Dernière intervention
24 novembre 2013
-
18 mars 2008 à 14:06
tom818 Messages postés 19 Date d'inscription mardi 10 juillet 2007 Statut Membre Dernière intervention 24 novembre 2013 - 18 mars 2008 à 15:08
tom818 Messages postés 19 Date d'inscription mardi 10 juillet 2007 Statut Membre Dernière intervention 24 novembre 2013 - 18 mars 2008 à 15:08
A voir également:
- Aide javascript
- Telecharger javascript - Télécharger - Langages
- Javascript echo ✓ - Forum PHP
- Table de multiplication javascript ✓ - Forum Javascript
- 1fichier javascript ✓ - Forum Téléchargement
- Quelque chose bloque le fonctionnement de javascript sur votre ordinateur ✓ - Forum Virus
1 réponse
tom818
Messages postés
19
Date d'inscription
mardi 10 juillet 2007
Statut
Membre
Dernière intervention
24 novembre 2013
13
18 mars 2008 à 15:08
18 mars 2008 à 15:08
voila mon code mais il ne fonctionne pas, pourriez vous le vérifier?
<HTML>
<HEAD> M150 TMAO3 Question 1
<TITLE>SOFASPEND - IN THE BEST POSSIBLE TASTE!</TITLE>
<SCRIPT
language="JavaScript"
type="text/javascript">
var customer;
var firstName;
var secondName;
var password
customer = window.prompt('Please enter 1 to register as a new customer or 2 for estabisched customer','');
if (customer == 1)
{
document.write('<BR>' + 'WELCOME – WE WILL SET UP YOUR ACCOUNT DETAILS NOW');
firstName = window.prompt('Please enter your first name','');
secondName = window.prompt('Please enter your second name','');
password = window.prompt('Please enter your password','');
while((password.length < 7) || (password.length > 15))
{
var nbChar = password.length;
if(password.length < 7)
{
var res = 7 - nbChar;
document.write('Your password have' + nbChar + 'characters');
document.write('You must also enter' + res + 'characters');
}
else
if(password.length > 15)
{
var res = nbChar - 15;
document.write('Your password have' + nbChar + 'characters');
document.write('You must delete' + res + 'characters');
}
password = window.prompt('Please enter your password','');
}
}
else
{
if (customer == 2)
{
document.write('<BR>' + 'SHOP UNTIL YOU DROP');
}
<HTML>
<HEAD> M150 TMAO3 Question 1
<TITLE>SOFASPEND - IN THE BEST POSSIBLE TASTE!</TITLE>
<SCRIPT
language="JavaScript"
type="text/javascript">
var customer;
var firstName;
var secondName;
var password
customer = window.prompt('Please enter 1 to register as a new customer or 2 for estabisched customer','');
if (customer == 1)
{
document.write('<BR>' + 'WELCOME – WE WILL SET UP YOUR ACCOUNT DETAILS NOW');
firstName = window.prompt('Please enter your first name','');
secondName = window.prompt('Please enter your second name','');
password = window.prompt('Please enter your password','');
while((password.length < 7) || (password.length > 15))
{
var nbChar = password.length;
if(password.length < 7)
{
var res = 7 - nbChar;
document.write('Your password have' + nbChar + 'characters');
document.write('You must also enter' + res + 'characters');
}
else
if(password.length > 15)
{
var res = nbChar - 15;
document.write('Your password have' + nbChar + 'characters');
document.write('You must delete' + res + 'characters');
}
password = window.prompt('Please enter your password','');
}
}
else
{
if (customer == 2)
{
document.write('<BR>' + 'SHOP UNTIL YOU DROP');
}