Affichage texte javasript dans la même fenêtre
Bonjour,
J'ai un menu déroulant qui affiche une adresse email quand je clique sur un nom du menu. Pour l'iinstant j'ai mis une alerte pour afficher cet email. Hors je voudrais qu'il s'affiche automatiquement sur ma page. Est-ce possible??
Mon code:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| <script type="text/javascript">
function savoir(sel)
{
alert(sel.options[sel.selectedIndex].value);
}
</script>
<? $sql="SELECT * FROM operateurs";?>
<b>Nom de l'opérateur :</b>
<select name="nom" onchange="savoir(this);">
<?$result = mysql_query($sql);
while ($rs = @mysql_fetch_array($result)) {?>
<option value="<? echo $rs["operateurs_email"];?>"><? echo $rs["operateurs_nom"]; ?></option>
<?}?>
</select> |