JAVASCRIPT - dans menu pointer sur un signet

Fermé
Ho_oH - 9 mai 2004 à 21:16
 Utilisateur anonyme - 24 mai 2004 à 12:31
Bonjour,
Je souhaiterais dans un menu déroulant pointer vers un signet dans une page. Quelle est la syntaxe exacte ?
Merci pour la réponse.
A voir également:

1 réponse

Utilisateur anonyme
24 mai 2004 à 12:31
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<!--
	Author: HackTrack
	Creation: 24-05-2004
-->
<head>
	<script language="javascript" type="text/javascript">
			function forward(selectId){
				select = document.all(selectId);
				if(select.selectedIndex > -1){
					document.location.href=select.options[select.selectedIndex].value;						
				}
			}
	</script>
</head>

<body>
<select id="testSelect" onchange="forward(this.id);">
		<option value="https://www.google.be/?gws_rd=ssl">Google
		<option value="https://www.commentcamarche.net/">CCM
		<option value="https://outlook.live.com/owa/">Hotmail		
</select>

</body>
</html>


;-)
HackTrack
0