"result"
Bootstrap 4.0.0 Snippet by Hituat

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html> <html> <body> <h2>Student Result Task</h2> Maximum Marks :<input id="demo" type="number" name="text1" value="100" readonly><br><br> <input id="mark"type="number" name="text2" value=" " placeholder="Enter Your Obtained Marks"><br><br> Your Result is:<span id="result"></span><br><br> <button id="select" onclick="myFunction()">Submit</button> <script> function myFunction(){ var vl=document.getElementById("mark").value; var s=Number(vl); if(s >= 0){ if(s<35){ q="fail"; } else if(s==35 || s <= 59){ q="second class"; } else if(s==60 || s <= 75){ q="first class"; } else if(s==76 || s <= 85){ q="Distinction"; } else if(s==86 || s <= 100){ q="Rank"; } else{ alert("Invalid Marks"); } document.getElementById("result").innerHTML=q; } else{ alert("Invalid Marks"); } } </script> </body> </html>

Related: See More


Questions / Comments: