{"id":3031,"date":"2026-02-02T10:11:14","date_gmt":"2026-02-02T09:11:14","guid":{"rendered":"https:\/\/labodemaths.fr\/WordPress3\/?p=3031"},"modified":"2026-02-02T10:53:00","modified_gmt":"2026-02-02T09:53:00","slug":"nsijsjeu-du-pendu","status":"publish","type":"post","link":"https:\/\/labodemaths.fr\/WordPress3\/nsijsjeu-du-pendu\/","title":{"rendered":"NSI,JS,jeu du pendu"},"content":{"rendered":"\n<p>le html<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=\"fr\"&gt;\n    &lt;head&gt;\n        &lt;meta http-equiv=\"Content-Type\" content=\"text\/html; charset=UTF-8\"&gt;\n  &lt;link rel=\"stylesheet\" href=\"style.css\"&gt;\n  &lt;link rel=\"preconnect\" href=\"https:\/\/fonts.googleapis.com\"&gt;\n&lt;link rel=\"preconnect\" href=\"https:\/\/fonts.gstatic.com\" crossorigin&gt;\n&lt;link href=\"https:\/\/fonts.googleapis.com\/css2?family=Bowlby+One&amp;display=swap\" rel=\"stylesheet\"&gt;\n  &lt;title&gt;jeu du pendu&lt;\/title&gt;\n  &lt;\/head&gt;\n&lt;body&gt;\n&lt;div id=\"plateau\"&gt;\n&lt;h1 id=\"mot\"&gt;&lt;\/h1&gt;\n&lt;h1&gt;Proposer une lettre&lt;\/h1&gt;\n&lt;\/div&gt;\n    &lt;\/body&gt;\n\t&lt;script src=\"script.js\"&gt;&lt;\/script&gt;\n\t&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<p>le css<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#plateau {\n    position: absolute;\n    width: 600px;\n    height: 300px;\n    top:50px;\n    left: 200px;\n    margin-top:50px;\n    background-color: aquamarine;\n}\n\n\nh1 {\n\tcolor: #FF5733;\n\tfont-size: 30px;\n\twidth: 50%;\n    margin-left: 25%;\n\tfont-family: \"Bowlby One\", sans-serif;\n  font-weight: 400;\n  font-style: normal;\n  text-align: center;\n}\n<\/code><\/pre>\n\n\n\n<p>le js<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>var liste_mots=&#91;\"INFORMATIQUE\",\"TENNIS\",\"ORDINATEUR\",\"LAPIN\"]\r\nvar alea=Math.floor(Math.random() * 4);\r\nvar mot_a_trouver=liste_mots&#91;alea];\r\nvar texte=document.getElementById(\"mot\");\r\nvar mot_affiche=\"\";\r\nfor ( var i=0;i&lt;mot_a_trouver.length;i++){\r\n\tmot_affiche=mot_affiche+\"-\";\r\n}\r\ntexte.textContent=mot_affiche;\r\nvar tentatives=0;\r\ndocument.addEventListener(\"keydown\",touche,false);\r\n\r\nfunction touche(evt){\r\n\tvar touche=event.key;\r\n\tvar lettre=touche.toUpperCase();\r\n\tvar retour=\"\"\r\n\tvar lettre_dans_mot=false;\r\n\tfor ( var i=0;i&lt;mot_a_trouver.length;i++){\r\n\t\tif (lettre==mot_a_trouver&#91;i]){\r\n\t\t\tretour=retour+lettre;\r\n\t\t\tlettre_dans_mot=true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tretour=retour+mot_affiche&#91;i];\r\n\t\t}\r\n}\r\n  if (lettre_dans_mot==false){\r\n\t  tentatives+=1;\r\n\t  document.getElementById(\"tentative\").textContent=\"Tentatives : \"+tentatives;\r\n  }\r\n\t\tmot_affiche=retour;\r\n\t\ttexte.textContent=mot_affiche;\r\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>le html le css le js<\/p>\n","protected":false},"author":2,"featured_media":2542,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[57],"tags":[],"_links":{"self":[{"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts\/3031"}],"collection":[{"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/comments?post=3031"}],"version-history":[{"count":2,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts\/3031\/revisions"}],"predecessor-version":[{"id":3033,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts\/3031\/revisions\/3033"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/media\/2542"}],"wp:attachment":[{"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/media?parent=3031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/categories?post=3031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/tags?post=3031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}