JavaScript Project to Calculate Student Marks | Marks Calculator In JavaScript With Source Code

 JavaScript Project to Calculate Student Marks & Percentage of Student | छात्र अंक और छात्र के प्रतिशत की गणना करने के लिए जावास्क्रिप्ट परियोजना

Students marks Calculator is a simple project in HTML5, CSS, and JavaScript. In this project is for calculating total marks and percentage. When  you run this project then you don’t need to have any kind of local server but yet a browser. We recommend you to use modern browsers like Google Chrome and Mozilla Firefox./ छात्र अंक कैलकुलेटर HTML5, CSS और जावास्क्रिप्ट में एक सरल परियोजना है। इस परियोजना में कुल अंक और प्रतिशत की गणना के लिए है। जब आप इस प्रोजेक्ट को चलाते हैं तो आपके पास किसी भी प्रकार का local सर्वर नहीं बल्कि एक ब्राउज़र होना चाहिए। हम आपको बेहतर प्रदर्शन के लिए Google क्रोम और मोज़िला फ़ायरफ़ॉक्स जैसे आधुनिक ब्राउज़रों का उपयोग करने की सलाह देते हैं।

marks-calculate-in-javascript

Calculate total marks in javascript

<!DOCTYPE html>
<html>

<head>
    <style>
        * {
            padding: 0px;
            margin: 0px;
            box-sizing: border-box;
        }

        .main-div {
            display: grid;
            justify-content: center;
            align-items: center;
            background-color: red;
            height: 750px;
        }

        .sub-div {
            width: 500px;
            background-color: #000000;
            color: #ffffff;
            padding: 70px;
            height: 400px;
            display: grid;
            justify-content: center;
            text-align: center;
            ;
        }

        .form-btn {
            padding: 7px 20px;
            text-align: center;
            height: 30px;
            width: 120px;
            margin: auto;
        }

        .heading {
            margin-bottom: 15px;
            ;
        }
    </style>

</head>

<body>
    <div class="main-div">
        <div class="sub-div">
            <h1 class="heading">Enter Your Marks</h1>
            <form
                oninput="num.value=parseInt(firstNumber.value)+parseInt(secondNumber.value)+parseInt(thirdNumber.value)">
                English: <input type="text" id="firstNumber" /><br><br>
                Punjabi: <input type="text" id="secondNumber" /><br><br>
                Science: <input type="text" id="thirdNumber" /><br><br>
            </form>
            <button type="button" onclick="percentage()" class="form-btn">See Result</button>
            <br>
            <p id="demo"></p><br>
        </div>
    </div>
    <script>
        function percentage() {
            var num1 = document.getElementById("firstNumber").value;
            var num2 = document.getElementById("secondNumber").value;
            var num3 = document.getElementById("thirdNumber").value;
            var num4 = parseInt(num1) + parseInt(num2) + parseInt(num3);
            var num5 = num4 / 300 * 100;
            document.getElementById("demo").innerHTML = `Out of 300 your total ${num4} and percentage is ${num5}%.`
        }
    </script>
</body>

</html>

Output:


Click Here ----> Detail information in hindi JavaScript project to calculate student marks



Previous
Next Post »

Please do not entering spam link in the comment box ConversionConversion EmoticonEmoticon