Bjr, je voudrais afficher dynamiquement une variable après un click sur le bouton. (c'est pas un grand succès)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 <!DOCTYPE html> <html lang="fr"> <head> <meta charset="UTF-8" /> <script> val = 1; function addi( ){ ++val; } </script> </head> <body> <button onClick="addi()">ok</button> <p><script>document.write( val );</script></p> </body> </html>
Partager