Fonction en javascript
Résolu
nickleus
Messages postés
384
Statut
Membre
-
nickleus Messages postés 384 Statut Membre -
nickleus Messages postés 384 Statut Membre -
Bonjour a tous,
voila ma question
je voulais savoir si on pouvais tester plusieurs fonctions javascript en meme temps. je m explique:
j'appel une fonction de ce type :
function testConfirmation(){bloc instruction}
window.onload = setup;
function setup(){
document.getElementById("confirmation").onblur = testConfirmation;}
est ce que ce qui suit pourrait fonctionner :
function testConfirmation(){bloc instruction}
function testPasse(){bloc instruction}
window.onload = setup;
function setup(){
document.getElementById("confirmation").onblur = testConfirmation, testPasse, .....;}
si ca ne marche pas est ce qu'il y a une autre solution ??????
merci d'avance
--
Il n'y a pas de problème, il n'y a que des solutions
voila ma question
je voulais savoir si on pouvais tester plusieurs fonctions javascript en meme temps. je m explique:
j'appel une fonction de ce type :
function testConfirmation(){bloc instruction}
window.onload = setup;
function setup(){
document.getElementById("confirmation").onblur = testConfirmation;}
est ce que ce qui suit pourrait fonctionner :
function testConfirmation(){bloc instruction}
function testPasse(){bloc instruction}
window.onload = setup;
function setup(){
document.getElementById("confirmation").onblur = testConfirmation, testPasse, .....;}
si ca ne marche pas est ce qu'il y a une autre solution ??????
merci d'avance
--
Il n'y a pas de problème, il n'y a que des solutions
Configuration: Windows Vista Firefox 3.0
A voir également:
- Fonction en javascript
- Fonction si ou - Guide
- Fonction trier excel - Guide
- Fonction excel en anglais - Guide
- Fonction remplacer word - Guide
- Excel remplir automatiquement une cellule en fonction d'une autre ✓ - Forum Excel
2 réponses
Bonsoir,
Pour appeler une fonction depuis la page html il faut "nom_de_ta_fonction();"
ex:
window.onload = "setup();";
si tu veux en appeler deux tu as plusieurs solutions:
1-
ou
2- tu appelles une3 ième fonction
Pour appeler une fonction depuis la page html il faut "nom_de_ta_fonction();"
ex:
window.onload = "setup();";
si tu veux en appeler deux tu as plusieurs solutions:
1-
window.onload = "setup(); testConfirmation()";
ou
2- tu appelles une3 ième fonction
window.onload = "lance_2fct()";
//et cette fonction contient
function lance_2fct(){
setup();
testConfirmation()";
}