WEBLEB
Home
AI Editor
Login
Pro
English
English
Français
Español
CALCULE-GT
11
programme
Open In Editor
Publish Your Code
0
HTML
Copy
nana
calcule des moyenne
calcule
CSS
Copy
<style> .bt{ border: 2px solid black; width: 40%; background: black; display: block; margin: 200px auto; } @media (max-width: 600px){ .bt{ width: 80%; } } h1{ text-align: center; color: white; } h3{ font-family: ARIAL; text-align: center; color: white; } input{ width: 90%; display: block; margin: auto; padding: 4px; border: none; background: rgb(0, 0, 255); color: white; } h2{ text-align: center; color: wheat; } button{ padding: 4px 40px; display: block; margin: 10px auto; background: linear-gradient(45deg, red ,blue); border-radius: 20px; border: 3px solid red; box-shadow: 0 0 10px red ,0 0 20px red, 0 0 30px red; } h3{ border: 1px solid white; width: 100%; }
JS
Copy
<script> function calcule() { let note1 = Number(document.getElementById("note1").value); let note2 = Number(document.getElementById("note2").value); let compo = Number(document.getElementById("compo").value); let parti = Number(document.getElementById("parti").value); let dev = note1 + note2 ; let dev1 = dev / 2; let note = dev1 * 0.35; let composition=compo* 0.60; let Participation= parti * 0.05; let tous = note + composition + Participation ; document.getElementById("texte3").innerHTML= tous; document.getElementById("texte2").innerHTML= Participation ; document.getElementById("texte").innerHTML=note; document.getElementById("texte1").innerHTML=composition; } </script>