Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!doctype html>
<html lang="fr">
  <head>
    <meta charset="utf-8">
    <style>* {font-family: sans-serif}</style>
  </head>
  <body>
    Aujourd'hui, nous sommes le <span id="date"></span><br>
    <br>
    Entrez votre calcul :<br>
    <input type="text" value="4+50" id="calcul">
    <input type="submit" value="Calculer" onclick="calcule()">
    <script>
      var date = new Date();
      document.getElementById("date").innerHTML = date.toLocaleDateString();
      
      function calcule() {
        var resultat = eval(document.getElementById("calcul").value);
        document.getElementById("calcul").value = resultat;
      }
    </script>
  </body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
tfontanetpro
0viewers