Step 4: The Defender Certificate چالش 4 از جلسهی 64، سخت
صفحهی گواهی را بساز: ده چکباکس (input type="checkbox" با کلاس item و شناسههای c1 تا c10) برای ده مورد چکلیست، یک کادر #name، یک دکمهی #issue و یک بخش #cert. با کلیک روی #issue: اگر همهی ده تا تیک خوردهاند و نام خالی نیست، متن #cert را Web Defender: <name> (10/10) کن؛ وگرنه #cert → <تعداد تیکخورده>/10 - not yet. از document.querySelectorAll(".item:checked").length استفاده کن.
<h1>Web Defender checklist</h1>
<p>Add the ten checkboxes, the name box, the button and the certificate area.</p>
<script>
function issue() {
// count the ticked items and write the certificate
}
</script>
راهنما و جواب این چالش · برگشت به درس جلسهی 64: ارائه و گواهی مدافع
بیشتر بخوان: شرط if، elif و else در پایتون: آموزش کامل با مثال