Files
agila-learning-examples/ceb/expanded-8-2/lesson-1/lesson.html
T

5 lines
1.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html><html lang="ceb"><meta charset="utf-8"><title>I-validate ang input ug butangi og label ang control</title><h1>I-validate ang input ug butangi og label ang control</h1><p>15-minutong sesyon: pagbasa sulod sa 3 minutos, pag-trace sa 3, pag-eksperimento sa 7, ug pagtubag sa check sa 2. Paggahin og dugang oras kon gikinahanglan.</p><p>Ang makita nga label nagpasabot sa input. Ang for attribute nagdugtong niini sa id. Sulayi ang empty, 0, 1, 60, 61, ug 1.5. Makatabang ang HTML constraint apan kinahanglan mag-validate pag-usab ang server kay mahimong usbon ang browser request. Walay data nga isumite sa server kining preview.</p><pre><code class="language-web">&lt;!doctype html&gt;
&lt;html lang=&quot;en&quot;&gt;&lt;meta charset=&quot;utf-8&quot;&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width,initial-scale=1&quot;&gt;
&lt;title&gt;Agila study&lt;/title&gt;
&lt;main&gt;&lt;h1&gt;Study time&lt;/h1&gt;&lt;label for=&quot;minutes&quot;&gt;Minutes (1–60)&lt;/label&gt;&lt;input id=&quot;minutes&quot; type=&quot;number&quot; min=&quot;1&quot; max=&quot;60&quot;&gt;&lt;button id=&quot;check&quot;&gt;Check&lt;/button&gt;&lt;p id=&quot;result&quot; role=&quot;status&quot;&gt;&lt;/p&gt;&lt;/main&gt;
&lt;script&gt;document.getElementById(&quot;check&quot;).onclick=()=&gt;{const raw=document.getElementById(&quot;minutes&quot;).value;const n=Number(raw);document.getElementById(&quot;result&quot;).textContent=raw.trim()!==&quot;&quot;&amp;&amp;Number.isInteger(n)&amp;&amp;n&gt;=1&amp;&amp;n&lt;=60?&quot;Ready&quot;:&quot;Use a whole number from 1 to 60&quot;;};&lt;/script&gt;&lt;/html&gt;</code></pre><h3>Praktis ug ebidensiya</h3><p>Isulat ang tagna, aktuwal nga resulta, ug hinungdan sa pagkapareho o kalainan. Ang completion check mosukod sa pagsabot; ang practice task mopauswag sa kahanas.</p></html>