EXERCISE : COMPUTING GRADES
<!DOCTYPE html> <html> <head> <title> TOTAL OF GRADES<b></title> </head> <body> <b>Enter your name: <input type = "text" placeholder= "type" id="input1" Value=" "><br> <b>Enter your score: <input type = "text" placeholder= "type" id="input2" Value=" "><br> <b>Enter the Total number of Items: <input type = "text" placeholder="type" id="input3" Value=" "><br> <button type= "button" onclick= "next();">compute</button> <script> function next(){ var n1 =(document.getElementById("input1").value); var n2 = Number(document.getElementById("input2").value); var n3 = Number(document.getElementById("input3").value); Grade1 =(n2/n3); Grade2 =(Grade1*100); alert("name:" + n1 + "\n\ntotal score...




Comments
Post a Comment