Aller au contenu
View in the app

A better way to browse. Learn more.

Next

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Petite question en javascript

Featured Replies

Posté(e)

Bonjour,

voilà j ai deux listes de choix.

Dans celle de gauche, j ai 5 option, quand j en sélectionne une, je peut la copier dans une liste a droite.

Ca ca marche

Mais j ai aussi un bouton pour copier toute la liste de gauche vers la liste de droite, et je sais pas comment faire

Merci de m aider svp, je suis dans la *****

<HTML>
<HEAD>
<TITLE></TITLE>
<script LANGUAGE="JavaScript">
function Deplacer(l1,l2) 
{
if (l1.options.selectedIndex>=0) 
{
o=new Option(l1.options[l1.options.selectedIndex].text,l1.options[l1.options.selectedIndex].value);
l2.options[l2.options.length]=o;
l1.options[l1.options.selectedIndex]=null;
}
else
{
alert("Aucun élément n'est sélectionné");
}
}

function dtd(l1,l2) 
{
o1=new Option(l1.options[l1.options.selectedIndex].text,l1.options[l1.options.selectedIndex].value);
l2.options[l2.options.length]=o1;
l1.options[l1.options.selectedIndex]=null;
}

function dtg(l1,l2)
{
o=new Option(l1.options[l1.options.selectedIndex].text,l1.options[l1.options.selectedIndex].value);
l2.options[l2.options.length]=o;
l1.options[l1.options.selectedIndex]=null;
}
</SCRIPT>
</HEAD>
<BODY>

<FORM name="formulaire">
<TABLE><TR>
<TD align="center"><B><FONT size="2">Liste 1</FONT></B><BR>
<SELECT align=top name="liste1" size=6  style="width:120px">
<OPTION value="mons">Mons</OPTION>
<OPTION value="tournai">Tournai</OPTION>
<OPTION value="ath">Ath</OPTION>
<OPTION value="la_louviere">La Louvière</OPTION>
<OPTION value="soignies">Soignies</OPTION>
</SELECT>
</TD>
<TD align="center">
	<INPUT type="button" value="=>" onClick="dtd(this.form.liste1,this.form.liste2)">
<br>
	<INPUT type="button" value="->" onClick="Deplacer(this.form.liste1,this.form.liste2)">
<BR>
	<INPUT type="button" value="<-" onClick="Deplacer(this.form.liste2,this.form.liste1)">
<br>
	<INPUT type="button" value="<=" onClick="dtg(this.form.liste2,this.form.liste1)">

</TD>
<TD align="center"><FONT size="2"><B>Liste 2</B></FONT><BR>
<SELECT align=top name="liste2" size=6 style="width:120px">
<OPTION value="10">----------------------</OPTION>
</SELECT>
</TD>
</TR></TABLE>
<script language="javascript">
document.formulaire.liste2.options.length=0;
</SCRIPT>
 <input type="submit" name="Submit" value="Afficher les préfixes">
</FORM>

</BODY>
</HTML>

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.