Bonjour,
j'essaye de créer un DIV avec un input, le DIV et l'input sont associés par une feuille de style, la creation se fait par javascript.
Mais l'action sur le bouton ne produit rien :calim2:
csshtml + jsCode:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 div#identification { width:300px; height:300px; background-color:#FFCC00; } div#identification.input.nomTextBox{ font-size:10px; margin:0px; padding:0px; height:12px; } div#identification.input.prenomTextBox{ position:relative; top:20px font-size:10px; margin:0px; padding:0px; height:12px; }
Merci de votre aideCode:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 <html> <head> <script language="javascript"> function createMasque() { var myDiv = document.createElement('DIV'); myDiv.className = 'identification'; var textBox = document.createElement('INPUT'); textBox.className = 'nomTextBox'; textBox.id = 'textBoxNom' textBox.value = "test"; } </script> <link rel="stylesheet" href="f.css" type="text/css"></link> </head> <body> <input type='button' onclick='createMasque();'> </body> </html>