Activité-Paranormale


Red devil Information

Publicité

Rechercher

Développement

Apportez vos talents de codeur !

Développer

Citations

Random quotation
Pourquoi Emmanuel Macron ne joue jamais au Monopoly ? Parce qu’à chaque fois qu’il tombe sur « Impôts », il dit : « Ça, c’est pour vous. Moi, je passe directement par la case Banque Centrale Européenne. »
(Afghanistan Afghanistan)

Événements - 15 octobre

Event Calendrier

Validation

Valid XHTML 1.0 Transitional Valid CSS!

Crystal ballTour de magie

AbductionSélectionner le texte d'un champ en Javascript

Image not found

Le code suivant permet, en Javascript, de sélectionner le contenu d'un champ en cliquant sur un bouton :

<html>
  <head>
    <script>
      function displayResult() {
        document.getElementById("myTextarea").select();
      }
    </script>
  </head>
  <body>
    <textarea id="myTextarea" cols="20"> At W3Schools you will find all the Web-building tutorials you need, from basic HTML to advanced XML, SQL, ASP, and PHP. </textarea>
    <br />
    <button type="button" onclick="displayResult()">Select contents of text area</button>
  </body>
</html>

 



JavaScript


Publicité