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.

getFirstChild - DHTML

Featured Replies

Posté(e)

Bonjour à tous,

J'ai encore un probleme en DHTML :

Dans mon body j'ai écrit cela :

<select id="monId">
<option value='myValue' />myOption
</select>

Et avec le DHTML j'aimerais que lorsque je clique sur un bouton, tout ce qui est etre <select>..</select> soit modifié.

J'ai donc essayé :

document.getElementById('monId').getFirstChild.nodeValue=''

Sauf que ca marche pas !

Je pense que ca vient du fais qu'il y ai écrit FIRST child. Ce n'ai pas forcement le premier enfant de myID "<option value='myValue' />myOption". le premier Enfant de myID c'est bien "<otpion value='myValue' />", n'es ce pas ?

Pouvez vous m'indiquier comment je peux atteindre "<option value='myValue' />myOption" en entier ?

Merci à tous

C'est bon, j'ai trouvé. Au lieu de mettre "<OPTION >mon_option" je vais mettre   et je vais faire une fonction qui, lors du boot, remplacera ce texte par "<OPTION ...>..." grace à document.getElementById('').firstChild.nodeValue....

Merci quand même !

Bonne fin de Week End @ tous

Modifié par Sarvok

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.