Bonjour
Est ce qu'il y a une solution javascript qui me permet d'avoir la champ texte qui apparaît après la sélection de la valeur 'autre' dans la même ligne que ma liste déroulante ?
Il y a une solution avec les tables, mais je cherche une autre.
Et merci
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
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script language="javascript"> function change(){ if(document.forms[0].elements["sel"].value == 'autre' ){ document.forms[0].elements["valu"].style.display = 'block'; document.forms[0].elements["valu"].value = ''; }else{ document.forms[0].elements["valu"].style.display = 'none'; } } </script> </head> <body bgcolor="#999999"> <form> <table width="100%" border="1"> <tr> <td>aaaa</td> <td>aaaa</td> </tr> <tr> <td>bddd</td> <td> <select name="sel" onchange="change();"><option value="standard">Standard</option> <option value="AAA">AAA</option> <option value="BBB">BBB</option> <option value="autre">Autre</option></select> <input type="text" name="valu" maxlength="10" size="10" value=""style="display : none"> </td> </tr> </table> </form> </body> </html>
Partager