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
|
<script type="text/javascript">
var newOption, newText, autres;
function ajouteoption(op){
if(op.options[op.options.selectedIndex].text=="Autres..."){
autres=!op[0].value ? op.options.selectedIndex : op.options[op.options.selectedIndex];
if(newText=prompt("entrez le texte de l\'option","")){
newOption=document.createElement('option');
newOption.text=newText;
op.add(newOption,autres)
op[op.length-2].selected=true;
}
}
}
-->
</script>
</head>
<body>
<form action="kkk.php" method="post" name="formulaire">
<select id="s" onchange="ajouteoption(this)" size="1">
<option>Direction Génerale</option>
<option>--------------------</option>
<option>Dir.Info-Comm</option>
<option>Dir.Pédagogie</option>
<option>Dir.de le Foramtion</option>
<option>Secrétariat Génerale</option>
<option>Autres...</option>
</select>
</form>
</body>
</html> |